[squeak-dev] The Trunk: System-mt.1403.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Wed Mar 29 09:48:10 UTC 2023


Hi Eliot --

Done via
Collections-mt.1031
CollectionsTest-mt.386

(System-mt.1404)
(Morphic-mt.2100)

Best,
Marcel

Am 28.03.2023 16:13:26 schrieb Eliot Miranda <eliot.miranda at gmail.com>:
Hi Marcel,

On Mar 28, 2023, at 12:46 AM, Marcel Taeumel via Squeak-dev <squeak-dev at lists.squeakfoundation.org> wrote:



Hmm... hmm... well, it is a more usable test than Text >> #unembellished ... hmm...
https://en.wikipedia.org/wiki/Plain_text [https://en.wikipedia.org/wiki/Plain_text]


"In principle, plain text can be in any encoding, [...]" ... this also feeds into the "Why are ByteStrings not yet decoded? There are ByteArrays for encoded stuff." discussion.

Well, begin "plain text" surely is *some* domain or interpretation... not sure how it relates to Smalltalk and how textual content is represented in the image... hmm...

It is an interpretation within the domain of the Smalltalk Text class itself, which is a string with per character attributes. My method answers if there are in fact no attributes on a Text.  It therefore clearly applies to the Text class itself and not to some specific domain outside it.  Can we please put it back in the testing protocol of Text?

BTW, if I were going to put it in System-Support I would categorize it as *System-Support-testing, not just *System-Support.

 


Ha! "Our" current (practical) interpretation of instances of Text being "plain" is "no attributes but text alignment":

TextMorph >> newContents:
[...]
self plainTextOnly ifTrue: [ newText removeAttributesThat: [:att | att isTextAlignment not] ].

[...]

Any more thoughts? I would at least keep it consistent... throughout the image...

Best,
Marcel
Am 28.03.2023 08:42:01 schrieb Eliot Miranda <eliot.miranda at gmail.com>:
Doesn’t seem domain specific to me. Instead it answers whether a text has any emphasis or not. By definition strings don’t.

_,,,^..^,,,_ (phone)

> On Mar 27, 2023, at 1:01 AM, commits at source.squeak.org wrote:
>
> Marcel Taeumel uploaded a new version of System to project The Trunk:
> http://source.squeak.org/trunk/System-mt.1403.mcz
>
> ==================== Summary ====================
>
> Name: System-mt.1403
> Author: mt
> Time: 27 March 2023, 10:00:56.498651 am
> UUID: 106cd43c-6be0-314c-ac46-e16bf55f8a89
> Ancestors: System-eem.1402
>
> As usual, move domain-specific string/text messages into extension protocol. Use *System-Support for now but it could be *Network as well or something that relates to the underlying MIME classification (here: text/plain).
>
> =============== Diff against System-eem.1402 ===============
>
> Item was added:
> + ----- Method: String>>isPlainText (in category '*System-Support') -----
> + isPlainText
> + "For compatibility with Text"
> + ^true!
>
> Item was added:
> + ----- Method: Text>>isPlainText (in category '*System-Support') -----
> + isPlainText
> + "A Text with no emphasis has empty values."
> + ^runs values = #(#())!
>
>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20230329/d96ba38d/attachment.html>


More information about the Squeak-dev mailing list