• 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
Re: Crash when NSPersistentDocument tries to present error during saveDocument:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crash when NSPersistentDocument tries to present error during saveDocument:


  • Subject: Re: Crash when NSPersistentDocument tries to present error during saveDocument:
  • From: Jerry Krinock <email@hidden>
  • Date: Sat, 27 Dec 2008 13:13:20 -0800

Well, the problem is not in my 200 lines of inserting objects, setting attributes and relationships into the document, because I removed and simply ran this:

BmxBk* bmxBk = [documentController openUntitledDocumentAndDisplay:NO
error:&error] ;
[bmxBk setFileURL:[NSURL fileURLWithPath:docPath]] ;
[bmxBk saveDocument:self] ;

in DepartmentsAndEmployees, the Apple Sample for Core Data Document- Based Applications, and got the same crash. However, if I run this code in a non-Core-Data document-based application, there is no crash.


My app, like DepartmentsAndEmployees, will saveDocument: with no trouble if when the document is created by clicking File>New in the menu.

My guess is that something needs to be done before you can save an NSPersistentDocument, something more than is done by openUntitleDocumentAndDisplay:error: and setFileURL:. Does anyone know what that "something" might be?

Jerry

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Crash when NSPersistentDocument tries to present error during saveDocument:
      • From: "Kyle Sluder" <email@hidden>
References: 
 >Crash when NSPersistentDocument tries to present error during saveDocument: (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: How do I include a URL in a preprocessed Info.plist?
  • Next by Date: Re: Crash when NSPersistentDocument tries to present error during saveDocument:
  • Previous by thread: Crash when NSPersistentDocument tries to present error during saveDocument:
  • Next by thread: Re: Crash when NSPersistentDocument tries to present error during saveDocument:
  • Index(es):
    • Date
    • Thread