• 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: This document’s file has been changed by another application since you opened or saved it.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: This document’s file has been changed by another application since you opened or saved it. (From: Mike Abdullah <email@hidden>)
 >Re: This document’s file has been changed by another application since you opened or saved it. (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Re: NSTreeController: how do I select a model object?
  • Next by Date: Re: NSTreeController: how do I select a model object?
  • Previous by thread: Re: This document’s file has been changed by another application since you opened or saved it.
  • Next by thread: Re: This document’s file has been changed by another application since you opened or saved it.
  • Index(es):
    • Date
    • Thread