[BUG] Scamper
David N. Smith (IBM)
dnsmith at watson.ibm.com
Thu Oct 12 18:55:44 UTC 2000
At 14:41 -0400 10/12/00, David N. Smith \(IBM\) wrote:
>Hi:
>
>Minor bug in Scamper; parentheses are missing from a nil check:
>
>labelString
> "return the title of the current page, or nil if there is none"
> document == nil
> ifTrue: [ ^'Scamper' ]
> ifFalse: [ ^'Scamper: ' , self document head title ifNil: ['Scamper: (untitled)'] ]
>
>This fails when the title is nil since the concatenation happens first. It should be:
>
>labelString
> "return the title of the current page, or nil if there is none"
> document == nil
> ifTrue: [ ^'Scamper' ]
> ifFalse: [ ^'Scamper: ' , (self document head title ifNil: ['(untitled)']) ]
>
>Dave
Uh, did I mention that this is for 2.8 only? It's fixed in 2.9... (Duh...)
Dave
_______________________________
David N. Smith
IBM T J Watson Research Center
Hawthorne, NY
_______________________________
Any opinions or recommendations
herein are those of the author
and not of his employer.
More information about the Squeak-dev
mailing list
|