[Seaside] WAImage implemented but a question and suggestion
m.bany at wanadoo.fr
Wed Mar 30 07:58:08 CEST 2005
Dmitry Dorofeev a écrit :
> Checked in debugger and i see that assignment was made in the block.
> But somehow value is visible only in the
> block and not in method body. If I make errorText an instance var,
> then everything is working as expected.
> Is it Seaside specific, Smalltalk specific, Squeak (3.7) specific or i
> just missed something ?
This is the way Smalltalk works.
There are two different contexts. The one that deals with the output,
where #show: is sent to Transcript.
The other that deals with the input, i.e. the callback block. The later
is active a few seconds after the former,
(depending on end-user clicking speed). These two contexts do not share
their temporary variables, like
errorText. When you define errorText as an instvar, then it is shared.
Hope this helps.
More information about the Seaside