[Seaside] Temporary variable for callback
m.bany at wanadoo.fr
Sat Nov 25 15:34:56 UTC 2006
Damien Cassou a écrit :
> I thought code like this used to work:
> TestComponent>>renderContentOn: html
> | firstname |
> html form:
> [html textInput
> callback: [:value | firstname := value].
> html submitButton
> callback: [self inform: 'Hello ' , firstname]].
> But it seems it is not the case ; when the callback of submit button
> is executed, firstname is nil. However, a 'self halt' in the callback
> of textInput shows that firstname is changed correctly. I use
> Seaside2.7a1-pmm.134 (last version).
> If I change the temporary to an instance variable, the problem
> disapear and it works perfectly.
Your code would work fine in VW.
This issue has already been discussed in details
More information about the Seaside