I have an NSDocument
that contains a dataOfType
method, but it is not called when I do a save.
- (NSData *)dataOfType:(NSString *)typeName
error:(NSError *__autoreleasing *)outError
{
NSLog(@"db: %@", db);
return [NSKeyedArchiver archivedDataWithRootObject:db];
}
Why is this not called? Specifically, are there any reasons why my current document should not be the first responder that the menu-item "Save" points to?
Did you leave 'Use Core Data' checkbox unchecked on create new project window?