[Seaside] Tasks and reusing components

radoslav hodnicak rh at 4096.sk
Tue Feb 23 08:57:43 UTC 2010

Using the latest 3.0, I have a task that controls the main flow of the 
application, like


pic := self call: ImagePicker new.
self call: (ImageEditor new image: pic).
text := self call: (Anotator new image: pic).


this works fine, even when using the browser's back and forward buttons. 
However, when I store the components in the task (created in 
#initialize) and reuse them instead

pic := self call: self imagePicker.
self call: (self imageEditor image: pic).
text := self call: (self anotator image: pic).

and then try to use the back and forward buttons it all goes haywire - 
the flow is somehow accumulated and components answer automatically 
multiple times (depending on how much I switch pages back and forth) and 
it's a big mess. I'm not quite sure why that happens, but is there a way 
to "reset" the component instance between each step so that it would 
behave as if I created a new one?

It's not critical, but this loop is all the user is ever going to do and 
it will probably be a fairly busy site, so it seems silly to create tons 
of new instances when I could reuse them.


More information about the seaside mailing list