Re: Crash when NSPersistentDocument tries to present error during saveDocument:
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