binding

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

binding

Stéphane Ducasse
Hi

Class>>binding
        ^ Smalltalk globals associationAt: name ifAbsent: [ nil -> self ]

and it should be

Class>>binding
        ^ self environment associationAt: name ifAbsent: [ nil -> self ]

since the environment of the class could be another systemDictionary.

Class>>environment

        environment == nil ifTrue: [^ super environment].
        ^ environment

http://code.google.com/p/pharo/issues/detail?id=2799

Stef


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: binding

Igor Stasenko
On 13 August 2010 17:43, Stéphane Ducasse <[hidden email]> wrote:

> Hi
>
> Class>>binding
>        ^ Smalltalk globals associationAt: name ifAbsent: [ nil -> self ]
>
> and it should be
>
> Class>>binding
>        ^ self environment associationAt: name ifAbsent: [ nil -> self ]
>
+1

> since the environment of the class could be another systemDictionary.
>
> Class>>environment
>
>        environment == nil ifTrue: [^ super environment].
>        ^ environment
>
> http://code.google.com/p/pharo/issues/detail?id=2799
>
> Stef
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project