Bug in BlockContext ?

Samir Saidani saidani at info.unicaen.fr
Tue Feb 15 20:01:38 UTC 2005


Hi Bert,

Thanks for pointing me this out, I found some mails about this closure
problem. However, I tried this several little examples without success
:

a := 2.
block := [:a1 | [a1]  ] fixTemps value: a.
block value.
a := 1.
block value.
           -> 2


a := 2.
block := [:a1 | [a1] fixTemps  ] value: a.
block value.
a := 1.
block value.
           -> 2

It doesn't work :-( 


Bert Freudenberg <bert at impara.de> writes:

> Am 15.02.2005 um 15:24 schrieb Samir Saidani:
>
>> Hello,
>>
>> I'm really not sure if this is a bug, or if I don't understand well
>> the way a BlockContext works in Squeak
>
> I'm sure that must be in the FAQ somewhere - Blocks in regular Squeak
> are not Closures. A workaround is to manually send fixTemps the block.
>
> - Bert -
>
>
>

-- 
Samir SAIDANI				
PhD Student in CS / Doctorant en informatique 	web : http://www.info.unicaen.fr/~saidani
Universite de Caen - Laboratoire GREYC          tel : 02-31-56-74-30
Equipe MAD - Campus II - 14032 Caen Cedex       fax : 02-31-56-76-30



More information about the Squeak-dev mailing list