Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug? NSPersistentDocument Core Data Tutorial



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.