hi - I stumbled upon this surprising property of WATask in Seaside3 today (because it broke my old code): chaining two tasks works only if the second is returned by #children (though non-tasks don't need to be returned by #children). Could someone confirm this, and maybe explain it? Here is a much simplified scenario to reproduce the issue: Task1>>go self call: Task2 new Task2>>go self inform: Time now printString The above doesn't work, failing with WATaskNotDelegated. This on the other hand works: Task>>go self call: Component new Component>>renderContentOn: html html heading: Time now printString Furthermore, as soon as Task1 is modified to answer the Task2 instance in its #children, the first example starts working (regardless of whether it is the same Task2 instance across calls, or a new one on each cycle). So it looks like "chained tasks count as children components" and must be declared as such in #children, while "chained non-task components do not count as children components" (and hence do not need to be answered in #children). I couldn't find any info on that in tutorials or googles, so: is that right? And if so, why is there this asymmetry? thanks, Michal _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
bump. Anyone? > I stumbled upon this surprising property of WATask in Seaside3 today (because it broke my old code): chaining two > tasks works only if the second is returned by #children (though non-tasks don't need to be returned by #children). > Could someone confirm this, and maybe explain it? Here is a much simplified scenario to reproduce the issue: > > Task1>>go > self call: Task2 new > Task2>>go > self inform: Time now printString > > The above doesn't work, failing with WATaskNotDelegated. This on the other hand works: > > Task>>go > self call: Component new > Component>>renderContentOn: html > html heading: Time now printString > > Furthermore, as soon as Task1 is modified to answer the Task2 instance in its #children, the first example starts > working (regardless of whether it is the same Task2 instance across calls, or a new one on each cycle). > > So it looks like "chained tasks count as children components" and must be declared as such in #children, while > "chained non-task components do not count as children components" (and hence do not need to be answered in > #children). I couldn't find any info on that in tutorials or googles, so: is that right? And if so, why is there > this asymmetry? > > thanks, > Michal > > _______________________________________________ > 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 |
Hmm... I think that might be a bug, but I'm not sure off the top of my
head what exactly is going on. It looks like when the first task is executed, the second task is immediately created and Seaside doesn't notice that it needs to execute it. Could you file an issue in the issue tracker and someone can take a look at it. Julian On Sat, Feb 19, 2011 at 10:03 AM, Michal <[hidden email]> wrote: > > bump. Anyone? > >> I stumbled upon this surprising property of WATask in Seaside3 today (because it broke my old code): chaining two >> tasks works only if the second is returned by #children (though non-tasks don't need to be returned by #children). >> Could someone confirm this, and maybe explain it? Here is a much simplified scenario to reproduce the issue: >> >> Task1>>go >> self call: Task2 new >> Task2>>go >> self inform: Time now printString >> >> The above doesn't work, failing with WATaskNotDelegated. This on the other hand works: >> >> Task>>go >> self call: Component new >> Component>>renderContentOn: html >> html heading: Time now printString >> >> Furthermore, as soon as Task1 is modified to answer the Task2 instance in its #children, the first example starts >> working (regardless of whether it is the same Task2 instance across calls, or a new one on each cycle). >> >> So it looks like "chained tasks count as children components" and must be declared as such in #children, while >> "chained non-task components do not count as children components" (and hence do not need to be answered in >> #children). I couldn't find any info on that in tutorials or googles, so: is that right? And if so, why is there >> this asymmetry? >> >> thanks, >> Michal >> >> _______________________________________________ >> 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 |
Free forum by Nabble | Edit this page |