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

Hernán Morales Durand hernan.morales at gmail.com
Mon Nov 1 01:41:43 UTC 2010

Hi all,

I'm experimenting different behavior between Seaside 2.8 and 3.0
regarding parameters passed in callback blocks. Attached there is code
to test in both platforms (just click in any of the first 8 links),
the problem is in the variable index in the #callback: of the
following code

	| index |
	index := 1.
	8 timesRepeat: [
		aRenderer tableRow: [
			5 timesRepeat: [			
				aRenderer tableData: [
					aRenderer anchor
						callback: [ self callbackFor: index ];
						with: 'image link'.
					index := index + 1.
				]  ] ] ].

In Seaside 2.8 after clicking the link 3 for example, the
#callbackFor: method received 3 as parameter.
In Seaside 3.0 #callbackFor: receive 41.

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)

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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestCallbackIndex-Core (Seaside 3).st
Type: application/octet-stream
Size: 2887 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/seaside/attachments/20101101/9d436c4d/TestCallbackIndex-CoreSeaside3-0001.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestCallbackIndex-Core (Seaside 28).st
Type: application/octet-stream
Size: 2875 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/seaside/attachments/20101101/9d436c4d/TestCallbackIndex-CoreSeaside28-0001.obj

More information about the seaside mailing list