On 2013 Oct 14, at 14:46, Rick Mann <[email protected]> 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 protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to