[squeak-dev] versioning objects
tim Rowledge
tim at rowledge.org
Wed Apr 16 04:06:02 UTC 2008
On 15-Apr-08, at 8:46 PM, Colin Putney wrote:
>
>
> The usual way to do this is to have all your undoable units of work
> be implemented by "command" objects that know how to perform a
> specific action. Then when the user does something undoable, you
> create a command, execute it, then push it on the undo stack. To
> undo you can either have the command know how to undo its self, or
> have it create an "inverse" command. This kind of thing works pretty
> well, and it can be extended with other features like redo, logging,
> journal-and-snapshot persistence etc.
That's pretty much what we did in Sophie. It's non-trivial but then
the problem domain is non-trivial.
tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
A sad tale that brings a lump to the eye and a tear to the throat.
More information about the Squeak-dev
mailing list
|