I'm trying to open a file, and I'm currently implementing
- (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError **)outError
from within the NSDocument subclass. (Documentation for above method)
For some reason, typeName is returning as a string "DocumentType". I thought its supposed to be the file extension of the file opened, but now I'm not sure.
Is this correct? How do I error check to make sure the user didn't open an unsupported file type? Thanks