nesting #call: in a single request? possible? ideas?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

nesting #call: in a single request? possible? ideas?

sebastianconcept@gmail.co
Hi guys,

what if you need to have an initialRequest: making your app going to nest, say two, #call: 'd components at once?

typical situation when the session is expired but your app gets the right model from some URL parameter but the reaction is not the main component but some one deeper

right now I see that it kind of can't be done (raising a WATaskNotDelegated), but I could be missing something

not that there aren't workarounds but ...

ideas?


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: nesting #call: in a single request? possible? ideas?

Julian Fitzell-2
Mm... try #show: instead? (not sure if I'm understanding your problem correctly)

On Tue, Mar 1, 2011 at 3:05 PM, Sebastian Sastre
<[hidden email]> wrote:

> Hi guys,
> what if you need to have an initialRequest: making your app going to nest,
> say two, #call: 'd components at once?
> typical situation when the session is expired but your app gets the right
> model from some URL parameter but the reaction is not the main component but
> some one deeper
> right now I see that it kind of can't be done (raising a
> WATaskNotDelegated), but I could be missing something
> not that there aren't workarounds but ...
> ideas?
> sebastian
> o/
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: nesting #call: in a single request? possible? ideas?

michal-list
In reply to this post by sebastianconcept@gmail.co

> right now I see that it kind of can't be done (raising a
> WATaskNotDelegated), but I could be missing something

If I understand your problem, it can actually be done, but because of
some quirk the embedded task must be included in #children -- see my
message about this a few weeks ago on this list. (There are actually
some more quirks, that I am still investigating)

This is one thing that used to be more straightforward in earlier
versions of seaside.

Michal
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: nesting #call: in a single request? possible? ideas?

Julian Fitzell-2
On Tue, Mar 1, 2011 at 11:14 PM, Michal <[hidden email]> wrote:
>
>> right now I see that it kind of can't be done (raising a
>> WATaskNotDelegated), but I could be missing something
>
> If I understand your problem, it can actually be done, but because of
> some quirk the embedded task must be included in #children -- see my
> message about this a few weeks ago on this list. (There are actually
> some more quirks, that I am still investigating)

I don't think so, because he's talking about doing multiple calls in a
single request and a call immediately triggers rendering, preventing
you from doing any other callback code... but as I said, I'm certain I
understood the question.

> This is one thing that used to be more straightforward in earlier
> versions of seaside.

It was more straightforward in some ways, but the changes are largely
due to the move to partial continuations. As well as being
inefficient, the full continuations were not accurately mapping what
was going on and resulted in some really weird bugs like your
exceptions being handled in different contexts than the ones you set
up, responses being returned to old socket connections, and so on. The
tasks used to be kicked off in a different way, but that resulted in
them being executed during the render phase, which we explicitly say
should not make changes to state.

As I said, I suspect what you reported in your other email was a bug -
I don't think you should need to include called presented in #children
(though the distinction of why seems so confusing to explain, I almost
wonder whether we wouldn't be better to recommend it anyway...).

Julian
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: nesting #call: in a single request? possible? ideas?

sebastianconcept@gmail.co
In reply to this post by Julian Fitzell-2
yep, solved using  #show:


o/


On Mar 1, 2011, at 2:01 PM, Julian Fitzell wrote:

> Mm... try #show: instead? (not sure if I'm understanding your problem correctly)
>
> On Tue, Mar 1, 2011 at 3:05 PM, Sebastian Sastre
> <[hidden email]> wrote:
>> Hi guys,
>> what if you need to have an initialRequest: making your app going to nest,
>> say two, #call: 'd components at once?
>> typical situation when the session is expired but your app gets the right
>> model from some URL parameter but the reaction is not the main component but
>> some one deeper
>> right now I see that it kind of can't be done (raising a
>> WATaskNotDelegated), but I could be missing something
>> not that there aren't workarounds but ...
>> ideas?
>> sebastian
>> o/
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>>
> _______________________________________________
> seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside