Block returns out of scope?
Maurice Rabb
m3rabb at stono.com
Wed Aug 26 07:40:48 UTC 1998
>It only works because the compiler adds 'aClass' to the method's list of
>temps when it discovers it in the block, and then doesn't rescind its scope
>correctly and the doens't take notice of it later. I did some hacking to
>make block temps work a while ago that 'fixed' this, I'll try to remember
>to extract the relevant bits tomorrow.
>
>What should be written there is
>.......setClass:[:aClass| theClass := aClass].
>and 'the Class' would need be a proper method temp.
>
>tim
Tim--
Thanks for clearing this up. My understanding of scoping is no longer
swinging in the breeze. I guess this is part of the whole closures
inconsistency.
--Maurice
---------------------------------------------------------------------------
Maurice Rabb 773.281.6003 Stono Technologies, LLC Chicago, USA
More information about the Squeak-dev
mailing list
|