[Seaside] Problem with callback blocks sharing context using closure image

Levente Uzonyi leves at elte.hu
Mon Nov 1 02:33:17 UTC 2010


On Mon, 1 Nov 2010, Hernán Morales Durand wrote:

> Hi Levente,
>
> I'm actually using an image with closure support, at least the orange
> test answers 'orange'
>
> | blockArray dataArray |
> blockArray := Array new: 5.
> dataArray := #( 'Apple' 'Orange' 'Grape' 'Lemon' 'Kiwi').
> 1 to: blockArray size do: [ :index |
> 	blockArray
> 		at: index
> 		put: [ dataArray at: index ] ].
> ^(blockArray at: 2) value

This works because the value of index never changes here. In your example 
the value of index changes.


Levente

>
> Cheers,
>
> 2010/11/1 Levente Uzonyi <leves at elte.hu>:
>> On Mon, 1 Nov 2010, Hernán Morales Durand wrote:
>>>
>>> I would like to preserve the parameter value configured in the
>>> rendering phase, any suggestion how to do that in Seaside 3? (Using
>>> PharoVM 4.0.2 12/4/2010 and Pharo1.1rc2 #11400)
>>
>> Use an image with support for closures. Or if that's not possible, then send
>> #fixTemps to the callback block.
>>
>>
>> Levente
>>
>>> Cheers,
>>>
>>> --
>>> Hernán Morales
>>> Information Technology Manager,
>>> Institute of Veterinary Genetics.
>>> National Scientific and Technical Research Council (CONICET).
>>> La Plata (1900), Buenos Aires, Argentina.
>>> Telephone: +54 (0221) 421-1799.
>>> Internal: 422
>>> Fax: 425-7980 or 421-1799.
>>
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>


More information about the seaside mailing list