[squeak-dev] Separating Morphic and MVC (was: Re: Text Editors)

Andreas Raab andreas.raab at gmx.de
Thu Aug 6 05:43:15 UTC 2009


Andreas Raab wrote:
> I very much like what you've done with the editors. Is it correct that 
> TextEditor is effectively protocol compatible with the old 
> TextMorphEditor? If so, what do you think about bringing this into 
> Squeak and phase out TextMorphEditor? Would this be doable or do you 
> foresee any problems due to other changes that you might have done? From 
> what I can see it looks as if this should be possible while preserving 
> all the Unicode and m17n-goodness that I don't want to give up for 
> Squeak. But boy, I would like to finally cut the Gordian knot called 
> ParagraphEditor that ties Morphic and MVC together at the hip ;-)

So I did some more investigation (and a few quick experiments the 
results of which you can find in the trunk) and I am now convinced that 
we can separate Morphic and MVC and unload MVC in a fully reloadable 
form. The key is (of course) the text editors. I think the plan for 
unloading MVC goes as follows:

1) Load the Cuis text editors; start using them. There is some work 
needed for the usual programming shortcuts and a few fixes here and 
there (mostly due to the SmalltalkImage current madness) but really we 
mostly just need to start using them and fix issues as they come up.

2) Create a new category Kernel-Models which include Model, 
StringHolder, and ValueHolder. Move ParagraphEditor and other Kernel-ST 
80 Remnants back into ST80.

3) Fix StringHolder>>codePaneMenu:shifted: not to use ParagraphEditor 
directly but rather to include an inline version of the method.

At this point I was able to unload MVC. After recompiling the entire 
system it turned out that most of the Undeclared references were to the 
various MVC menu classes (PopUpMenu, SelectionMenu, CustomMenu) and 
FillInTheBlank - all of which are easily replaced by UIManager.

The remaining references need a bit of actual work but I think we're 
relally talking about less than 100 methods total that need to be looked 
at. So it's entirely doable.

Question: Anyone interested in helping with this little project? Either 
by adding keyboard shortcuts to the Cuis editors or by helping fixing 
references to obsolete MVC references, or by testing the reloading of MVC?

Cheers,
   - Andreas



More information about the Squeak-dev mailing list