Skip navigation.
 
mlRe: Action based undo or snapshot based undo?
FROM : Jim Correia
DATE : Wed Jan 29 20:07:43 2003

On Wednesday, January 29, 2003, at 12:37  PM, Greg Titus wrote:

> On Tuesday, January 28, 2003, at 11:32  PM, Alexander Lamb wrote:
>

>> As I understood, the NSUndoManager is based on the idea of recording
>> a series of actions needed if the user wants to undo what he just >> did.
>> In Bill Cheeseman's book, he recommands recording those actions in
>> the action methods rather than at the object level, because it
>> reflects more closely what the user is doing and allows to customize
>> the undo for an action that may involve several changes on objects
>> attributes.

>
> I totally disagree with Bill here (sorry Bill), and I think that that
> is why you are running into problems.
>
> You should register the changes at the object level, but you should
> set the action name in the action methods.


I've read Bill's book, but don't have it handy to verify this. It is my
recollection that he recommends exactly what you do Greg - undo at the
model level and set the action name in the action methods.

You can grab the sample code for the book here

   <http://www.stepwise.com/articles/VermontRecipes/>

which implements undo in that manner.

Jim
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
mlAction based undo or snapshot based undo? Alexander Lamb Jan 29, 08:32
mlRe: Action based undo or snapshot based undo? Greg Titus Jan 29, 18:37
mlRe: Action based undo or snapshot based undo? Jim Correia Jan 29, 20:07
mlRe: Action based undo or snapshot based undo? Greg Titus Jan 29, 21:03
mlRe: Action based undo or snapshot based undo? Bill Cheeseman Jan 29, 21:19
mlRe: Action based undo or snapshot based undo? Brock Brandenberg Jan 29, 21:23
mlRe: Action based undo or snapshot based undo? Eric Wang Jan 30, 02:10
mlRe: Action based undo or snapshot based undo? Bill Cheeseman Jan 30, 02:17
mlRe: Action based undo or snapshot based undo? Greg Titus Jan 30, 03:56
mlRe: Action based undo or snapshot based undo? Brock Brandenberg Jan 30, 06:11
mlRe: Action based undo or snapshot based undo? Alexander Lamb Jan 30, 08:58
mlRe: Action based undo or snapshot based undo? Izidor Jerebic Jan 30, 13:54
mlRe: Action based undo or snapshot based undo? Izidor Jerebic Jan 30, 14:20
mlRe: Action based undo or snapshot based undo? Bill Cheeseman Jan 30, 16:13
mlRe: Action based undo or snapshot based undo? Greg Titus Jan 30, 18:29
mlRe: Action based undo or snapshot based undo? Brock Brandenberg Jan 30, 23:12
mlRe: Action based undo or snapshot based undo? Summary! Alexander Lamb Feb 6, 12:10
mlRe: Action based undo or snapshot based undo? Summary! Bill Cheeseman Feb 6, 13:08
mlRe: Action based undo or snapshot based undo? Summary! Greg Titus Feb 6, 17:56
mlRe: Action based undo or snapshot based undo? Summary! Alexander Lamb Feb 7, 14:22
mlRe: Action based undo or snapshot based undo? Summary! Marco Scheurer Feb 7, 16:07