• 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: Action based undo or snapshot based undo?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Action based undo or snapshot based undo?


  • Subject: Re: Action based undo or snapshot based undo?
  • From: Bill Cheeseman <email@hidden>
  • Date: Wed, 29 Jan 2003 20:17:19 -0500

on 03-01-29 3:23 PM, Brock Brandenberg at email@hidden wrote:

> What Greg mentions is possible much of the time, but it is simply not
> possible to do in some situations like Alexander mentions. Many mathematical
> problems, like optimization problems, simply do not have an inverse and
> cannot be undone by registering undo invocations for every attribute change.
> The process may simply not be reversible, no matter how much one thinks that
> you can reverse each and every attribute change. Destructive and
> non-reversible actions can occur during an optimization that are not
> captured by the state of the objects, and hence, cannot be undone by simply
> invoking attribute changes in a reverse order.

That's covered in my book, too. For example, when you remove a row from a
table, and later want to undo the deletion -- you can't just replay the
original insertion, because the first time you inserted the row you had to
create it. The second time, in the undo/redo scenario, you only have to
retrieve it from the undo stack and put it back in the table. I'm
oversimplifying, but it's perfectly feasible to handle the recording of an
undo operation in a "chained" fashion, recording a series of successive
actions instead of a simple reversal of a single operation.

--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com

The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont - http://members.valley.net/croquetvermont
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Action based undo or snapshot based undo? (From: Brock Brandenberg <email@hidden>)

  • Prev by Date: Re: Trouble with NSSplitView
  • Next by Date: Re: Trouble with NSSplitView
  • Previous by thread: Re: Action based undo or snapshot based undo?
  • Next by thread: Re: Action based undo or snapshot based undo?
  • Index(es):
    • Date
    • Thread