On Oct 14, 2013, at 15:37 , Jerry Krinock <[email protected]> wrote:

> 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.

That's how I felt at first, but really, it should be fine. The user experience 
is that of editing an item (really, it's a part in a specialized CAD program, 
and the UI to edit it is virtually identical to that of editing a document that 
uses those parts). The UI includes a window with dirty status, undo stack, etc. 
It just doesn't save to a disk, but rather to the library's MOC. The new 
concurrency types encourage this use, I think.

I have yet to adopt the new document convention of never having to save; I'm a 
bit old-school in this regard, and I find saving a copy a little cumbersome, 
etc, but the technique should lend itself to that, too.

> 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.

Yep, I'm now getting into a save loop; probably overloaded the wrong thing. 
When the user saves a new part, there's a specialized dialog for entering the 
save information (name, etc.), rather than a standard NSSavePanel. After that's 
done, I seem to be starting it all over again. I think I'm overriding at the 
wrong points.


-- 
Rick



Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________

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