A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.
Quick q. for all you programming wizards out there. Suppose you have a program (not scripted), and you wish to have a "global" undo manager. NOte that this is not only for text boxes, and such, but for global events such as "an increase in variable a", or "the deletion of object b".
What would be the best way to store/manage this type of thing? Would you use something where everything has it's own undo/redo implementation, or some kind of parser/delegator?
Monday, December 05, 2005
One way, if you have a command-oriented interface ( http://www.martinfowler.com/bliki/CommandOrientedInterface.html ), is to keep all your executed commands around in a stack and let them undo themselves as requested.
Thursday, December 08, 2005
I've implemented undo/redo with varying complexity using Javas Undo Architecture. It follows a pretty simple pattern. Maybe reading about helps you:
Friday, December 09, 2005
This topic is archived. No further replies will be accepted.Other recent topics
Powered by FogBugz