[squeak-dev] The Trunk: Morphic-mt.1852.mcz

mail at jaromir.net mail at jaromir.net
Sun Jan 23 10:38:52 UTC 2022


Hi Marcel,

"accept" on a Transcript window makes the contents disappear for good without any undo. Is this by design? It confuses me :)

Thanks

best,
~~~
^[^    Jaromir

Sent from Squeak Inbox Talk

On 2022-01-22T09:40:04+01:00, marcel.taeumel at hpi.de wrote:

> Hi Chris --
> 
> I don't understand what you are talking about. Both "accept" and "cancel" have still consistent and predictable behaviors. The only "new thing", which was already there in 5.3, is maybe #textEdited: where models can directly intercept typed contents and use them. This is unrelated to the still functional "accept" and "cancel" operations.
> 
> > What is the benefit of tossing the user's input which they explicitly accepted?
> 
> 
> We don't do that. What are you referring to?
> 
> Best,
> Marcel
> Am 22.01.2022 07:23:45 schrieb Chris Muller <asqueaker at gmail.com>:
> Hi Marcel,
> 
> "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.
> 
> Regards,
> Chris
> 
> On Thu, Jan 20, 2022 at 5:46 AM wrote:
> >
> > Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
> > http://source.squeak.org/trunk/Morphic-mt.1852.mcz
> >
> > ==================== 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') -----
> > cancelSafely
> > + "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].!
> >
> >
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220122/39c26fe3/attachment-0001.html>
> 
> 


More information about the Squeak-dev mailing list