How Do You UNDO?

Igor de Oliveira Couto igor at superstudent.net
Sat May 26 22:42:31 EDT 2012


Dear LiveCode Experts,

A reliable UNDO mechanism is an essential part of most desktop apps. Programming UNDO functionality, however, is not a trivial task, and it usually involves quite a bit of meta-programming: turning function calls into stackable objects, assembling the undo/redo stacks, keeping track of the undo/redo position in the stack, and updating the Undo/Redo menus.

To help programmers overcome all this complexity, most frameworks have some sort of 'UndoManager' class or library, that makes it easier on the developer to implement this functionality in their apps.

I have not been able to find any documentation on how to do this with LiveCode, and I'm getting quite confused and bogged down trying to think of how to go about implementing something from scratch. I have seen how so many programmers in this list have been developing *all* kinds of applications with LiveCode, seemingly for many years, and therefore I assume that there *must* be a way to implement an undo mechanism in LiveCode, which I'm missing...

How do you do it? How do you implement UNDO in your applications? Is there a generic mechanism or technique that you use, or do you re-invent the wheel with every project?

Any guidance will be enormously appreciated.

--
Igor Couto
Sydney, Australia





More information about the use-livecode mailing list