Why not delegate it in the used Editor ?� SmalltalkEditor should use shout while the other editors should use the NullTextStyler.� Maybe something like this:
PluggableTextMorph>>useDefaultStyler
��� self styler: textMorph editor styler
Or better:
PluggableTextMorph>>useDefaultStyler
��� self styler: textMorph styler
And then
Editor>>styler
Hi,
In the latest Morphic version, the default styler of the PluggableTextMorph is given by:
useDefaultStyler
� � � �"This should be changed to a proper registry but as long as there is only shout this will do"
� � � �Smalltalk globals
� � � � � � � �at: #SHTextStylerST80
� � � � � � � �ifPresent: [ :stylerClass | self styler: (stylerClass new view: self) ]
� � � � � � � �ifAbsent: [ self styler: ( NullTextStyler new view: self) ]
Thus, if Shout is loaded, you will get it in all text morphs by default. Given that TextMorph should be general and be used in all sorts of contexts, the default behavior should be the original:
useDefaultStyler
� � � �"This should be changed to a proper registry but as long as there is only shout this will do"
� � � �self styler: (NullTextStyler new view: self; yourself).
What do you say?
Cheers,
Doru
--
www.tudorgirba.com
"We are all great at making mistakes."