|
Hello,
I noticed that the editTextSelector is not sent to the model of a TextMorphForEditView (Morphic's PluggableInputField) when you press backspace or punctuation.
The cause is obvious in TextMorphForEditView>>keyStroke:
"Make a cheap check and guess editing. (Alternative would be to copy the old contents and then compare them against the new ones. Maybe add a better hook in the TextEditor." (self readOnly not and: [evt keyCharacter isAlphaNumeric or: [evt keyCharacter isSeparator]]) ifTrue: [view textEdited: self contents].
Is there a rationale behind only including alphanumeric and separator characters, but not punctuation or the obvious editing stroke of pressing backspace? Should they rather be included even if it means some more checks of the Character?
Also note that there is no #isPunctuation (or similar) in Character and #isSpecial does not include the full stop.
I wanted to synchronize the text of one input field with that of another (with a transformation in between) in case the latter of the two was not manually modified by the user. Especially the lack of backspace propagation impacts the user experience in this case.
Kind regards, Jakob
|