[squeak-dev] whisker browser

K K Subbu kksubbu.ml at gmail.com
Mon May 25 08:18:31 UTC 2020


On 25/05/20 12:49 pm, Marcel Taeumel wrote:
> Well, either aFont or emphasisCode can be nil. Not both. ;-) If I recall 
> correctly, that's the existing usage I found when refactoring 
> StringMorph last year in summer. It would be strange to support both 
> arguments to be nil.

StringMorph>>initializeFromText uses 'self font textStyle' without 
checking for nil. I saw direct ivar access instead of the fontsToUse 
from other places also.

How about this patch?

self assert: (aFont notNil | emphasis notNil).
font := aFont.
emphasis := emphasisCode ifNil: [0].

Regards .. Subbu


More information about the Squeak-dev mailing list