QotD    "To be or not to be" – Shakespeare
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
PluggableTextMorph, PluggableTextMorphPlus
Last updated at 8:44 pm UTC on 13 June 2018
to edit

Explore the following.

 | tm ptm |
 tm := TextMorph methodDictionary keys.

 ptm := PluggableTextMorph methodDictionary keys.

 {  {'TextMorph-specific'. tm difference: ptm. }.
 {'PluggableTextMorph-specific'.  ptm difference: tm}.
 {'Common'.  ptm intersection: tm.} }

Jakob Reschke
Mon, Jun 4, 2018 at 12:15 AM
Reply-To: The general-purpose Squeak developers list
To: The general-purpose Squeak developers list

PluggableTextMorph is the MorphicToolBuilder variant of MVC's PluggableTextView,

whereas I assume TextMorph is the original Morphic thing ported from Self.

The purpose of the latter is to display text in Morphic and the purpose of the former is to display (and edit) text in tools.

The pluggable morph contains a "non-pluggable" one. So, to me it looks like these two should not be confused, regarding #isTextMorph and #isTextView.

Regarding PluggableTextMorphPlus and the fact that PluggableTextMorph does not have a class comment, Tim might have a point. The Plus class does have a comment: "A pluggable text morph with support for color." But since any (Pluggable)TextMorph also supports colored text somehow, this explanation is a little too brief. It adds support for accessing the color from the model and adds the optional text styler for syntax highlighting. ...and an acceptAction, but this is definitely not captured in the class comment.

Anyway, PluggableTextMorphPlus is what MorphicToolBuilder builds when you ask for a pluggable text, be it for code or plain text.

It is unfortunate that MVC (or anything else) does not benefit from text styling (or any further customization, such as spell checker marks) this way, although Text and its color support are not specific to Morphic.