• 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: NSUndoManager retain/release of arguments - ad infinitum
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSUndoManager retain/release of arguments - ad infinitum


  • Subject: Re: NSUndoManager retain/release of arguments - ad infinitum
  • From: Graham Cox <email@hidden>
  • Date: Tue, 11 Jan 2011 21:48:36 +1100

On 11/01/2011, at 5:35 PM, Jerry Krinock wrote:

> But that assumes that the data was sorted with some old descriptors to begin with.  It seems like this would not work if the objects had been manually arranged into some arbitrary order by the user.

True, but then you'd make the reordering step undoable (i.e. moveObject:toIndex: or similar registers with undo).

To make Undo really work for you, you have to make everything undoable, then all state changes in your data model are tracked and any given undo operates on a data state that is consistent with its own internal picture of the data. I suppose if all else fails you could simply make Undo take a snapshot of the data itself but that strikes me as potentially very inefficient.

--Graham


_______________________________________________

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: 
 >NSUndoManager retain/release of arguments - ad infinitum (From: John Bartleson <email@hidden>)
 >Re: NSUndoManager retain/release of arguments - ad infinitum (From: Graham Cox <email@hidden>)
 >Re: NSUndoManager retain/release of arguments - ad infinitum (From: John Bartleson <email@hidden>)
 >Re: NSUndoManager retain/release of arguments - ad infinitum (From: Graham Cox <email@hidden>)
 >Re: NSUndoManager retain/release of arguments - ad infinitum (From: Jerry Krinock <email@hidden>)

  • Prev by Date: [ANNOUNCE] Behavior-Driven Development libraries
  • Next by Date: Re: NSUndoManager retain/release of arguments - ad infinitum
  • Previous by thread: Re: NSUndoManager retain/release of arguments - ad infinitum
  • Next by thread: Re: NSUndoManager retain/release of arguments - ad infinitum
  • Index(es):
    • Date
    • Thread