[squeak-dev] Breaking out CommandHistory

Bert Freudenberg bert at freudenbergs.de
Wed May 22 12:30:31 UTC 2013


On 2013-05-22, at 13:46, Frank Shearar <frank.shearar at gmail.com> wrote:

> Part of the System -> MorphicExtras dependency stems from references
> to CommandHistory. Now it seems that CommandHistory has almost nothing
> to do with MorphicExtras. The only thing that ties it to that package
> is CommandHistory class >> #resetAllHistory, which has the line
> 
> MorphExtension withAllSubclassesDo:
>    [:mexc | self forgetAllGrabCommandsFrom: mexc someInstance]
> 
> So it occurs to me that CommandHistory is useful beyond the context of
> a MorphicUI

So far it has only been used with morphs, but indeed, having system-wide undo would be great.

> , and hence perhaps we can resolve this territory dispute
> thusly:
> * move CommandHistory to somewhere in System (System-Support, perhaps), and
> * leave resetAllHistory in MorphicExtras, perhaps with
> #forgetAllGrabCommandsFrom:.
> 
> This doesn't fully resolve the issue, because SmalltalkImage >>
> #zapAllOtherProjects calls #resetAllHistory (among other
> dependency-on-MorphicExtras-causing actions), but does snip one more
> thread.
> 
> What do you think?
> 
> frank

forgetAllGrabCommands is a more recent addition, added 2 years after the general undo support it seems. There should be a better way to integrate it than the direct dependency.

- Bert -




More information about the Squeak-dev mailing list