[Seaside] Class Variable Browser Fix

Lukas Renggli renggli at gmail.com
Thu Jul 14 08:12:42 UTC 2011

> If you go to a class variable usage in the browser, say DefaultDirectory in FileDirectory>>default, and select and right click it, Seaside brings up a walk-back.

I cannot reproduce that.

Also note, that this is not Seaside related, but OmniBrowser (I thus
reply to the Pharo list).

> My fix for this re-writes the existing method a little by using '&' instead of the older 'and:', which I find clearer. What I've done is check that the value can respond to #asNode:
> globalReference
>        | binding |
>        target hasSelector
>                ifFalse: [ ^ nil ].
>        (requestor selectedClass notNil & (binding := requestor selectedClass bindingOf: target selector) notNil & binding value notNil & (binding value class selectors includes: #asNode))
>                ifTrue: [ ^ binding value asNode ].
>        (binding := Smalltalk classNamed: target selector) notNil
>                ifTrue: [ ^ binding value asNode ].
>        ^ nil

This certainly introduces other bugs. The use of the non-eager #and:
is intentional, because if "requestor selectedClass" is nil,
"requestor selectedClass bindingOf:" is not supposed to be evaluated.


Lukas Renggli

More information about the seaside mailing list