[Seaside-dev] 2.9a3 and tasks

Julian Fitzell jfitzell at gmail.com
Thu Mar 19 11:20:14 UTC 2009


Hi Sebastian,

I'm replying to the list for the benefit of others. Hope you don't mind.

The issue is in the example you sent is that your APPRoot component is not
implementing #children and is creating the new task while rendering. You
aren't able to create new tasks and components while rendering (just like
you aren't able to #call: while rendering).

This is mostly because the render phase requires that everything that will
be rendered is returned by #children *before* the rendering takes place. And
this is so that the children have a chance to update the page root, update
the URL, and (most importantly in this case) for tasks to start themselves
running.

If you add a "task" instvar and implement these methods on APPRoot, your
example seems to work:

children
    ^ Array with: task

initialize
    super initialize.
    task := self taskSupport new.

renderContentOn: html
    "html render: self taskSupport new"  "<-- don't do this"
    html render: task

We've been trying to improve the user experience in this area. If you have
the WalkbackErrorHandler enabled, you will see a list of possible causes for
most seaside errors. WATaskNotDelegated lists the following:

seasidePossibleCauses
    ^#(
        'The Task is embedded in another Component but has not been included
in the list of child Components returned by the Component''s #children
method.'
        'The application is not configured to use the Seaside-Flow package
and the Task has not been executed.'
    )

Of course, the UI for making sure that WAWalkbackErrorHandler is enabled
currently sucks so it probably isn't for you. We still need to fix that.

Hope that helps. Let me know if I can clarify further.

Julian

On Thu, Mar 19, 2009 at 2:58 AM, Sebastian Sastre <ssastre at seaswork.com>wrote:

> hi Julian,
> here I'm sending you an example. There I see the signal about delegation
> even
> before it renders the login component
> sebastian
>
> > -----Mensaje original-----
> > De: seaside-dev-bounces at lists.squeakfoundation.org
> > [mailto:seaside-dev-bounces at lists.squeakfoundation.org] En
> > nombre de Julian Fitzell
> > Enviado el: Wednesday, March 18, 2009 19:15
> > Para: Seaside - developer list
> > Asunto: Re: [Seaside-dev] 2.9a3 and tasks
> >
> > Well, they should be but it's possible I broke that and never tested
> > it. Is the first task delegating immediately to the second task?
> > Actually, if you could just post the simplest set of code that
> > reproduces it that would save me a lot of time trying to duplicate
> > your setup.
> >
> > Julian
> >
> > On Wed, Mar 18, 2009 at 6:59 PM, Sebastian Sastre
> > <ssastre at seaswork.com> wrote:
> > > hi there,
> > > I'm using a task (for login flux) which delegates to
> > another task (for app
> > > flux).
> > > In 2.9a3 I'm seeing a WATaskNotDelgated while that wasnt
> > happening in 2.9a2
> > > I've cheked in config and that application has Main Class
> > WAFlowMain so I don't
> > > get what could be wrong.
> > > tasks are still composable right? any ideas?
> > > sebastian
> > >
> > > _______________________________________________
> > > seaside-dev mailing list
> > > seaside-dev at lists.squeakfoundation.org
> > > http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
> > >
> > _______________________________________________
> > seaside-dev mailing list
> > seaside-dev at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside-dev/attachments/20090319/0ac2f2be/attachment.htm


More information about the seaside-dev mailing list