General information
Category:
Windows API functions
>>I'd go with a Command class, as described in "Design Patterns."
>
>Actually Mark, wouldn't the problem be solved better with a Memento pattern?
Memento saves states, Command saves commands. I think either would be workable here (although GHJ&V give an example of Undo with the Command pattern).
The thing about Command is that it supports the concept of a command (no matter how it was produced), with the capability of undoing that command. I once wrote an editor (a vi clone) that simply saved the keystrokes for each editing action, and replayed them in "undo" mode to undo their actions.
But your suggestion is good, too.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only