• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Core Data undo grouping
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >re: Core Data undo grouping (From: Ben Trumbull <email@hidden>)

  • Prev by Date: [OT] Core Animation is it up to the challenge
  • Next by Date: Re: IB plugins
  • Previous by thread: re: Core Data undo grouping
  • Next by thread: Complicated set of dynamic nested views
  • Index(es):
    • Date
    • Thread