[squeak-dev] Class Text : category 'emphasis' - method #allBold BUT NO #allItalics?

tim Rowledge tim at rowledge.org
Fri Jul 6 17:03:42 UTC 2018



> On 06-07-2018, at 1:30 AM, H. Hirzel <hannes.hirzel at gmail.com> wrote:
> [snip]
> allItalics
> 	string size = 0 ifTrue: [^self].
> 	self addAttribute: TextEmphasis italic from: 1 to: string size.
> 
> 
> Should this be added?

Well, it certainly isn't an expensive method to add, so one could say "certainly! go for it!". Given that there's a modest number of text emphases involved (bold, underline, strikeout, italic, regular, maybe one day 'styled by shout') it wouldn't be ridiculous to have each one covered. 

On the other hand, where does one stop? It's always tricky. I suppose one argument would be "if it was useful it would be there already" but that devolves rapidly into the sort of nonsense you see from naive wannabe economists. In this case, you've done the work to write it, it's small and simple, so stick it in.

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
"Bother" said Pooh, as the IRS kicked his door in.




More information about the Squeak-dev mailing list