• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
bug? NSPersistentDocument Core Data Tutorial
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: Cocoa - To display a string in 2 different lines but in the same table column and row in different fonts - Using the concept of cocoa bindings.
  • Next by Date: Re: Re: NSURLConnection memory hog?
  • Previous by thread: Re: [solved] Re: AudioFileOpen / FSOpenFork permission constants
  • Next by thread: NSScrollView bug or misunderstood behavior?
  • Index(es):
    • Date
    • Thread