Although we don't have any use of a "pure" TextMorph (I don't know of any place/project,I think this is a bug, introduced early in the move from squeak to pharo.(It used to work in squeak).
either it uses String/LabelMorphs for texts or it uses another TextEditorMorph), without any pluggableXXXMorph around it, I think we should fix this.2015-05-02 12:44 GMT+02:00 Ben Coman <btc@openinworld.com>:On Sat, May 2, 2015 at 5:31 PM, Stephan Eggermont <stephan@stack.nl> wrote:TextMorph new contents: 'Text'; openInWorldI don't know anything about this area, but thought it would be interesting to dig...
There is only one implementor of #editView which is TextMorphEditView, a subclass of TextMorph. But...�� �� TextMorphEditView��new contents: 'Text'; openInWorldright-click gives... "MessageNotUnderstood: receiver of "model" is nil" in��TextMorphEditView>>handleInteraction:in this code...self editor model: editView model. ��"For evaluateSelection, etc"where /editView/ ivar is nil.�� Only��TextMorphEditView>>setEditView: stores into this, and this has only one sender:���� �� PluggableTextMorph>>configureTextMorph:��Then I notice method ��"PluggableTextMorph class >> on: text: accept:",so creating the following with usual accessors with Transcript tracing in them...�� �� Object subclass: #MyData�� instanceVariableNames: 'text'�� classVariableNames: ''�� category: 'MyPlay'The following lets me edit and save...�� �� (PluggableTextMorph on: (MyData new text: 'hello') text: #text accept: #text:) openInWorldThough saving doesn't clear the yellow triangle and I don't yet know how to restrict it to one line without a scroll bar (if you needed that?)We have PluggableTextFieldMorph, that is used in
UITheme>>#newTextEntryIn: aThemedMorph for: aModel get: getSel set: setSel class: aClass getEnabled: enabledSel help: helpText��cheers -ben