undo (was Re: Why does Dynamic Typing really matter?!?)

Andrew Dalke adalke at mindspring.com
Fri Feb 7 21:44:47 EST 2003


David Eppstein:
> Take a look at OS X's Cocoa undo manager.
>
> Basically, every time you run a function that you want to be undoable,
> you call the undo manager with the function that would be used to undo
> it.  The undo manager remembers these calls and performs them later when
> undos are requested.  It does redos by similarly remembering the calls
> that would be used to undo what happened while it was doing an undo.
> In practice this leads to very concise and straightforward looking code
> that handles infinite levels of undo.

Can you or someone point me to a web page describing how to
implement do/undo/redo frameworks?  I've been looking around
and found a few references, but would like a few more to make sure
I understand things rightly.  Eg, I found the Cocao undo manager example
very interesting.

                    Andrew
                    dalke at dalkescientific.com






More information about the Python-list mailing list