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: Mike Abdullah <email@hidden>
- Date: Mon, 14 Oct 2013 22:30:45 +0100
On 14 Oct 2013, at 19:27, Rick Mann <email@hidden> wrote:
>
> On Oct 14, 2013, at 02:46 , Mike Abdullah <email@hidden> wrote:
>
>> So you're using the document architecture? Are you modifying the document outside of the -writeToURL:… methods? If so, there's your problem.
>
> It's Core Data, so I only ever modify the file via -[NSManagedObjectContext save:]. I don't even implement a writeToURL:… anywhere.
Therein lies your problem. You are modifying the document behind NSDocument's back. Let the user/document system decide when to save, rather than saving the context yourself. If you do desperately need to force a save, do so through NSDocument, not the context.
_______________________________________________
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