compiling blocks

David Farber dfarber at numenor.com
Tue Apr 28 20:30:57 UTC 1998


>> how do i compile '[ :foo | foo bar]' on the fly so that i can store it in
>> an instance variable and send value: to it sometime later on?
>
>Have a method returning this block. E.g.
>fooBlock
>	^[ :foo | foo bar ]
>
>otherMethod
>	object setBlock: self fooBlock

no, i have to create the string '[ :foo | foo bar]' on the fly. (because i
don't know bar). i need to create this block at *run time*.

dave

--
        j. david farber
    oo architect+mentor
numenor labs incorporated
in sunny boulder colorado
    dfarber at numenor.com
        www.numenor.com





More information about the Squeak-dev mailing list