[squeak-dev] The Trunk: Morphic-mt.1852.mcz
asqueaker at gmail.com
Sat Jan 22 06:22:57 UTC 2022
"Accept" and "Cancel" had consistent and predictable behaviors until
5.3, when they suddenly became exceptional. What is the benefit of
tossing the user's input which they explicitly accepted?
If the user explicitly "accepted" certain contents before, isn't that
their instruction of what they want? And if they wanted blank, they
could just as easily accept blank contents. This would at least be a
consistent behavior, _and_ a useful function. And the user endures no
extra keystrokes to "Delete everything" because Cmd+a prepare that
upon their next keystroke.
The old behavior seems better from multiple points.
On Thu, Jan 20, 2022 at 5:46 AM <commits at source.squeak.org> wrote:
> Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
> ==================== Summary ====================
> Name: Morphic-mt.1852
> Author: mt
> Time: 20 January 2022, 12:46:23.025835 pm
> UUID: 1984ed82-28fe-4b43-a07c-157bdf07398a
> Ancestors: Morphic-mt.1851
> In text fields, fixes #cancelSafely (i.e. CMD+L) for models that directly derive their textual contents user input (i.e. #textEdited:) without an extra #accept step. Examples include all uses of PluggableTextSpec >> #editText: such as Inspector, ObjectExplorer, and SearchBar. And the Debugger, which uses Inspector.
> =============== Diff against Morphic-mt.1851 ===============
> Item was changed:
> ----- Method: PluggableTextMorph>>cancelSafely (in category 'menu commands') -----
> + "Cancel all edits by replacing the content with the original contents. Retain the undo history. If a model is listening to #textEdited and maybe also directly derives #getText from it, clear the edit buffer first, so that a cancel means deleting everything."
> - "Cancel all edits by replacing the content with the original contents. Retain the undo history."
> self handleEdit: [
> + self textEdited: ''.
> textMorph editor replaceAllWith: self getText.
> + self textEdited: textMorph contents.
> self selectInterval: self getSelection.
> self hasUnacceptedEdits: false].!
More information about the Squeak-dev