bug? NSPersistentDocument Core Data Tutorial
bug? NSPersistentDocument Core Data Tutorial
- Subject: bug? NSPersistentDocument Core Data Tutorial
- From: Chris Outwin <email@hidden>
- Date: Sat, 11 Nov 2006 11:51:00 -0600
After reading about a bug in the NSPersistentDocument tutorial
( previously reported at: http://lists.apple.com/archives/cocoa-dev/
2006/Apr/msg02276.html ), I would like to ask about a similar issue:
The tutorial's Adding a Department Object chapter includes a section
entitled Supporting Document Revert. The code there calls the super
class' version of revertToContentsOfURL:.
- (BOOL)revertToContentsOfURL:(NSURL *)inAbsoluteURL ofType:(NSString
*)inTypeName error:(NSError **)outError
{
[departmentController setContent:nil];
[self setDepartment:nil];
return [super revertToContentsOfURL:inAbsoluteURL
ofType:inTypeName error:outError];
}
However, while using the tutorial to learn Core Data, I found my app
crashes when the super class' version of revertToContentsOfURL: is
called. (Department/p1> has been invalidated. is seen in the
console. ) When I simply return YES in lieu of calling the super
class version, my app seems to work.
return YES; //[super revertToContentsOfURL:inAbsoluteURL
ofType:inTypeName error:outError];
Is returning YES the correct procedure here?
Thank you,
Chris Outwin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden