[Seaside] break out of task
norbert at hartl.name
Mon Jul 9 09:07:00 UTC 2007
On Mon, 2007-07-09 at 10:03 +0200, Lukas Renggli wrote:
> > how is WATask supposed to be used? There is an endless
> > loop calling go on a task. How can I signal that this
> > task is "finished"? I would have expected a self answer
> > will do but it doesn't.
> WATask answers what your method #go is returning, which is self if you
> don't specify anything else. However if there is nobody that calls the
> task, it is simply restarted.
Ok, now I know that I have to do a call: on the task. This not how
my logic works. It would expect the task to just return and the
following statements set up new components to show.
> What would you expect otherwise? To get an empty component?
In general I would expect the task to end. I understand a task as
"do these things and then you are finished so exit". The place
where the task was could be nil then and it would displayed nothing
(as long as this would work). In my case I just set up components
in the background which will show automatically as soon as the task
Or I would expect to work like normal WAComponents. If I'm not wrong
they render themselves as long as no answer is called. But if it is
called they return. So this could also be true for a WATask.
More information about the Seaside