On 2014 Apr 04, at 06:40, Keary Suska <cocoa-...@esoteritech.com> 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 (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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to