[Seaside] Is seaside supports calling subtask inside task?
philippe.marschall at gmail.com
Sun Oct 7 20:59:42 UTC 2012
On Thu, Oct 4, 2012 at 8:00 PM, Julian Fitzell <jfitzell at gmail.com> wrote:
> Hmm... so if you return your sub-task in #children it will work.
> But we normally only insist that you return components that you are
> embedding, not calling, so this may be a bug.
> The problem is that by the time the WATaskVisitor has executed the task, the
> WAVisiblePresenterGuide has already visited the decoration chain, so we
> don't notice and execute the subtask. One possible fix is the following:
> WATaskVisitor>>visitTask: aTask
> super visitTask: aTask.
> aTask isExecuting ifFalse: [
> [ self halt. aTask execute ]
> on: WARenderNotification
> do: [ :n | (WAVisiblePresenterGuide client: (WATaskVisitor new))
> start: aTask ] ]
I assume the #halt is debug code.
> Probably it's fine, but I'm not sure if it's the best solution or not. We
> could grab the decorations before and after, look for a new decoration then
> just visit it. Or we could stop using WAVisiblePresenterGuide and use a
> subclass or some other visitor entirely to make sure that we execute tasks
> before visiting their decorations.
> What do other devs think?
Can you create an issue so that we don't forget this?
More information about the seaside