Re: This document’s file has been changed by another application since you opened or saved it.
Re: This document’s file has been changed by another application since you opened or saved it.
- Subject: Re: This document’s file has been changed by another application since you opened or saved it.
- From: Jerry Krinock <email@hidden>
- Date: Mon, 14 Oct 2013 15:37:35 -0700
On 2013 Oct 14, at 14:46, Rick Mann <email@hidden> wrote:
> The document that was giving me the trouble is a "Library" document my app implements. To edit an item in the library, I create a new document "ItemEditorDoc", and give it an NSManagedObjectContext that is a child of the LibraryDoc's MOC. (When the user saves the ItemEditorDoc, it should implicitly also save the LibraryDoc).
>
> Is this kosher?
Creating a document to edit an item seems pretty weird. "Give it a child MOC" (setting its managed object context, I presume) from some other document seems even more weird. I would recommend a more conventional design.
Or, maybe read Mike Abdullah's latest reply again. It depends not on what triggers the save operation but on what method is used.
• -[NSDocument saveDocument:] is kosher.
• -[NSManagedObjectContext save:] will cause the trouble you are seeing.
_______________________________________________
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