This changeset proposes an additional property for PluggableTextMorph/PluggableTextSpec, named #forceString. If it is activated, any formattings will be erased from the text morph instantly.
This can be useful for widgets that are not actually designed to accept texts and thus display a heap of unwanted formattings. An example is the SearchBar, which at least in my image too often looks totally misstyled after several copy'n'paste operations:
[cid:4dc50742-4fb0-49c7-8e91-e28c30faaff0]
(Or should maybe use a text styler there, instead?)
Another, probably better example is FillInTheBlankMorph. As it only returns a string, there is no need to display styled texts.
How would you think about it? Please let me know. :-)
Best,
Christoph
May the force be with you, but without formatting.
I don't know whether the feature is warranted. But if it is, please call it differently. What about removeAllTextAttributes or displayWithoutTextAttributes?
Kind regards, Jakob
Am Mo., 20. Jan. 2020 um 21:18 Uhr schrieb Thiede, Christoph < Christoph.Thiede@student.hpi.uni-potsdam.de>:
This changeset proposes an additional property for PluggableTextMorph/PluggableTextSpec, named #forceString. If it is activated, any formattings will be erased from the text morph instantly.
This can be useful for widgets that are not actually designed to accept texts and thus display a heap of unwanted formattings. An example is the SearchBar, which at least in my image too often looks totally misstyled after several copy'n'paste operations:
(Or should maybe use a text styler there, instead?)
Another, probably better example is FillInTheBlankMorph. As it only returns a string, there is no need to display styled texts.
How would you think about it? Please let me know. :-)
Best,
Christoph
Yes, a different name might be better. But to me, your proposals sound very verb-like but not adjective-like ...
Obviously, it might be better to create this hook directly in the TextEditor. Then we could remove the formatting even before displaying the formatted version only one microsecond to the user ...
Best,
Christoph
________________________________ Von: Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Jakob Reschke forums.jakob@resfarm.de Gesendet: Montag, 20. Januar 2020 23:24:23 An: The general-purpose Squeak developers list Betreff: Re: [squeak-dev] Changeset: forceString.1.cs
May the force be with you, but without formatting.
I don't know whether the feature is warranted. But if it is, please call it differently. What about removeAllTextAttributes or displayWithoutTextAttributes?
Kind regards, Jakob
Am Mo., 20. Jan. 2020 um 21:18 Uhr schrieb Thiede, Christoph <Christoph.Thiede@student.hpi.uni-potsdam.demailto:Christoph.Thiede@student.hpi.uni-potsdam.de>:
This changeset proposes an additional property for PluggableTextMorph/PluggableTextSpec, named #forceString. If it is activated, any formattings will be erased from the text morph instantly.
This can be useful for widgets that are not actually designed to accept texts and thus display a heap of unwanted formattings. An example is the SearchBar, which at least in my image too often looks totally misstyled after several copy'n'paste operations:
[cid:16fc50c8f93f456b1e51]
(Or should maybe use a text styler there, instead?)
Another, probably better example is FillInTheBlankMorph. As it only returns a string, there is no need to display styled texts.
How would you think about it? Please let me know. :-)
Best,
Christoph
Thiede, Christoph Christoph.Thiede@student.hpi.uni-potsdam.de schrieb am Di., 21. Jan. 2020, 17:06:
But to me, your proposals sound very verb-like but not adjective-like ...
Yes because you want a property on the widget, and you want it to do something, not be something.
But if you abstract from that and somehow equate the text view with the text then #withoutTextAttributes works as well.
Merged as #plainTextOnly via Morphic-mt.1818
On 2020-01-21T17:54:07+01:00, forums.jakob@resfarm.de wrote:
Thiede, Christoph <Christoph.Thiede at student.hpi.uni-potsdam.de> schrieb am Di., 21. Jan. 2020, 17:06:
But to me, your proposals sound very verb-like but not adjective-like ...
Yes because you want a property on the widget, and you want it to do something, not be something.
But if you abstract from that and somehow equate the text view with the text then #withoutTextAttributes works as well.
Wow, this one was old. Thank you! :-)
Maybe also remove all styles from a text when #plainTextOnly was turned on?
Best,
Christoph
________________________________ Von: Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Taeumel, Marcel Gesendet: Mittwoch, 8. Dezember 2021 14:32:13 An: squeak-dev@lists.squeakfoundation.org; forums.jakob@resfarm.de Betreff: Re: [squeak-dev] Changeset: forceString.1.cs
Merged as #plainTextOnly via Morphic-mt.1818
On 2020-01-21T17:54:07+01:00, forums.jakob@resfarm.de wrote:
Thiede, Christoph <Christoph.Thiede at student.hpi.uni-potsdam.de> schrieb am Di., 21. Jan. 2020, 17:06:
But to me, your proposals sound very verb-like but not adjective-like ...
Yes because you want a property on the widget, and you want it to do something, not be something.
But if you abstract from that and somehow equate the text view with the text then #withoutTextAttributes works as well.
squeak-dev@lists.squeakfoundation.org