[squeak-dev] whisker browser
K K Subbu
kksubbu.ml at gmail.com
Mon May 25 04:22:30 UTC 2020
On 24/05/20 6:56 pm, Martin Kuball wrote:
> StringMorph>>font: aFont emphasis: emphasisCode
>
> self
> setFont: ((aFont isNil or: [aFont emphasis = emphasisCode] or:
> [emphasisCode isNil])
> ifTrue: [aFont]
> ifFalse: [aFont emphasized: emphasisCode])
> emphasis: (emphasisCode ifNil: [aFont emphasis]).
>
> The check (aFont isNil) seems to imply that nil is a valid value here. But if
> you try, the method fails at [aFont emphasis].
Good catch! The () for emphasis: is being evaluated without checking for
aFont isNil. The aFont isNil check should be done before setFont.
Please post a patch to Inbox. See http://wiki.squeak.org/squeak/3279 for
the simple procedure.
Regards .. Subbu
More information about the Squeak-dev
mailing list
|