[squeak-dev] Re: BlockClosure vs BlockContext

John Chludzinski john.chludzinski at gmail.com
Wed Aug 4 05:26:52 UTC 2010


How about:

test1

| block w z |
 w := 3. z := 12.
block := { [ :a :b | Transcript show: a asString , '   ' , b asString; cr ]
. w . z }.
w := 0. z := 1.
 (block at: 1) value: (block at: 2) value: (block at: 3)


On Wed, Aug 4, 2010 at 12:39 AM, John Chludzinski <
john.chludzinski at gmail.com> wrote:

> When I try:
>
> test1
>
> | block w z |
>  w := 3. z := 12.
> block := [ Transcript show: w asString , '   ' , z asString; cr ].
>  w := 0. z := 1.
>  block value.
>
> I get: 0  1.  And NOT: 3  12, which are the values at the point of
> definition.
>
> How do I force the binding to (3 12)?
>
> ---John
>
>
> On Tue, Aug 3, 2010 at 6:50 PM, John Chludzinski <
> john.chludzinski at gmail.com> wrote:
>
>> I have some code that fixed the values of temps (in a BlockContext) at the
>> point of definition (using #fixTemps).  Now I'm using Seaside 3.0 on Squeak
>> 4.1 and the values of the block's temps is set at the point of call (when I
>> evaluate the block) - block are now BlockClosure's.  How do I fix the temps
>> to be the values where the block is defined?
>>
>> #fixTemps is now a no-op.
>>
>> ---John
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20100804/de1463d9/attachment.htm


More information about the Squeak-dev mailing list