This is explained in the NSPersistentDocument tutorial in the docs.
On Jun 11, 2009, at 10:03 PM, Kevin Ross wrote:
Hi all, have a Core Data document based application which uses modal
sheets as a way for the user to edit the document's data. What is
the best way to give the sheet the ability to operate on a copy of
the data with the parents sheet's undo context? And how best to
merge these changes with the main document context.
I've thought of having a unique MOC for each sheet, and then posting
a custom notification that would in turn cause each MOC to perform
something like:
for (id object in [managedObjectContext registeredObjects]) {
[managedObjectContext refreshObject:object
mergeChanges:YES];
}
Does this way make any sense? Is there a better way to do this that
I'm missing?
Thanks for any pointers!
Kevin
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/dave.fernandes%40utoronto.ca
This email sent to dave.fernan...@utoronto.ca
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com