On 2013-05-22, at 13:46, Frank Shearar <
[hidden email]> 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 -