Re: How to hide new objects in a NSTableView?
Re: How to hide new objects in a NSTableView?
- Subject: Re: How to hide new objects in a NSTableView?
- From: Joanna Carter <email@hidden>
- Date: Tue, 23 Mar 2010 19:13:32 +0000
Hi Kyle
> This isn't the recommended approach. It's recommended that you use a
> scratch MOC for your data entry sheet, so that the object insertion is
> seen as an atomic operation in the main MOC.
Yes, I would agree and that is, in fact, what I was doing but that then meant that I couldn't Undo the addition or editing of an object as an atomic operation.
From my research, the mergeChangesFromContextDidSaveNotification: method, that has to be called on the main MOC, doesn't play nicely with the MOC's undo manager.
So, I am now left thinking the only way around this is to insert an editing object in a secondary MOC, then, upon saving, insert a second object in the main MOC, copy the properties over from the editing object to the object in the main MOC, before rolling back the inserted object in the secondary MOC.
Wow!!! that is a whole load of hassle.
Joanna
--
Joanna Carter
Carter Consulting
_______________________________________________
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