[squeak-dev] Text >> unembellished

Tobias Pape Das.Linux at gmx.de
Fri Nov 15 20:58:41 UTC 2019

> On 15.11.2019, at 18:40, Thiede, Christoph <Christoph.Thiede at student.hpi.uni-potsdam.de> wrote:
> Hi all, I think we have a problem with Text>>#unembellished. By looking at its name, I would have assumed that this method checks whether a text has not any (visible) attributes. But actually, it checks whether the text has no other attributes than the default font and TextEmphasis bold!
> I think this is a misleading name. It causes an actual bug when you try to accept a HelpTopic which only contains bold formatting. In this case, the emphasis is not preserved ...

> What is the history of #unembellished? I suspect it comes from times where we didn't have shout but only formatted method headers that should not be stored into the methodSource. Am I correct?

This comes from the fact that before shout, the System Browser used to
make the selector bold in any method it showed. (Text>>makeSelectorBold).

So to detect whether anyone actually added text attributes (like color or links) to a method, and if so, ask the user to say whether they want to keep it (Text>>askIfAddStyle:req:). This is also use for showing code in a FileContentsBrowser (See #extraInfo) and when writing styled text to disk or so (WriteStream>>nextChunkPutWithStyle:) 

> The related preference #ignoreStyleIfOnlyBold also only has one sender, #unembellished. I would propose to ignore that preference and deprecate it. Any opinions? :-)

Hmm,  no opinion here other than "don't break all the thingsā€¦" :)

Best regards

More information about the Squeak-dev mailing list