Re: NSSet + NSUndoManager / Core Data = ?
Re: NSSet + NSUndoManager / Core Data = ?
- Subject: Re: NSSet + NSUndoManager / Core Data = ?
- From: Jerry Krinock <email@hidden>
- Date: Fri, 04 Apr 2014 11:23:50 -0700
On 2014 Apr 04, at 06:40, Keary Suska <email@hidden> wrote:
> is Core Data smart enough to do these tests itself for undo support, or should I do these tests myself before calling willchange/didchange?
I think the answer is “yes”. I’ve used Core Data with trees in complicated object graphs and never done any such tests. If you peek in at the messages passed to the Undo Manager when Core Data does an Undo or Redo, you’ll see that it’s always the same message, “…UndoUpdates…" or something like that. I think that it’s just saying “Hey, revert the data model to this previous state”. Because of the strict data model, it does not need to check relationships for consistency. Does that make sense?
Undo/Redo is the reason why I tolerate the other crap that comes with Core Data, at least in projects with complex data relationships, wherein implementing my own Undo/Redo could get hairy.
_______________________________________________
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