Re: Core Data undo grouping
Re: Core Data undo grouping
- Subject: Re: Core Data undo grouping
- From: Peter Sagerson <email@hidden>
- Date: Thu, 2 Oct 2008 23:58:01 -0700
[object setValue:@"1" forKey:@"attr"];
[self forceUndoBoundaryInContext:context];
[object setValue:@"2" forKey:@"attr"];
This is a little odd. If this is in the UI thread, it will be
confusing to the user in the typical scenarios. Are you sure you
don't want to create a nested undo group ?
This is actually pretty far removed from the UI. I'm managing internal
state that I want to be able to roll back to specific points. A single
rollback group may span many events. Imagine a stack of mutable
dictionaries, each one of which starts out as a copy of the one
before. Except with a managed object model, I can have complex,
documented structures and I don't have to worry about making deep
copies of nested mutable objects.
Fiddling with the undo groupings themselves should be done with
NSUndoManager API.
That's what I ended up doing, so I guess I was on the right track.
Thanks for the quick reply,
Peter
_______________________________________________
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