Hi. I'm getting an error, and I'm not sure what to do. I've
completed the exercises up through chapter 4. I get the list of tasks, and the menu bar across the top. The problem is that, when I click one of the links, I get "WAComponentsNotFoundError". The system suggests these possible causes: * you do not implement #children correctly * you do not backtrack #children correctly * you do not implement #states correctly I put a breakpoint in #children, and it appears to be returning the right components. Do I need to explicitly turn on backtracking? I'm not familiar with #states, was I supposed to do something with that? I'm working with the "Developer Image" from seaside.st. Squeak 3.9, Seaside 2.8a1. I did not use monticello or update any of the packages. Any suggestions? Thanks, Steve _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
>>>>> "Steven" == Steven Greenberg <[hidden email]> writes:
Steven> I put a breakpoint in #children, and it appears to be returning the Steven> right components. But are they the very same components as during the render? A common beginner mistake is to recreate child components on each access. That's ok, as long as you hold on to those *exact* components during the callback phase (returning them from #children), because the callback URLs have to point into *those* objects to know what blocks to run and state to manage. Even better is to create your child components during your first creation during #initialize, or lazily on first access, and then keep reusing those components on every render. If that helps you understand the problem, great. If not, we'll probably need to see more code. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <[hidden email]> <URL:http://www.stonehenge.com/merlyn/> Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi Randal. Thanks for taking a look.
I *think* that they're the same. I'm just following the example code in the book, and create the apps only once, during #initialize. Fileout attached. I created category "SEG-StTutToDoApp". Your help is greatly appreciated. Thanks, Steve _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside SEG-StTutToDoApp.st (12K) Download Attachment |
Aha! I solved it. I put a semicolon in the middle of my #with:with:
So it was Array with: blah; with: somethingelse Silly me! Thanks, Steve On Thu, Oct 16, 2008 at 11:29 AM, Steven Greenberg <[hidden email]> wrote: > Hi Randal. Thanks for taking a look. > > I *think* that they're the same. I'm just following the example code > in the book, and create the apps only once, during #initialize. > > Fileout attached. I created category "SEG-StTutToDoApp". > > Your help is greatly appreciated. > > Thanks, > Steve > seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Steven Greenberg
With it in, Array is sent the first message, 'with: menuComponent', which creates a new one-element array containing menuComponent. Then the second message ('with: listComponent') is sent to the Array, creating a new one-element array containing listComponent. So ultimately #children was returning just a one-element array.children ^ Array with: menuComponent with: listComponent Cheers, Pete Steven Greenberg wrote: Hi Randal. Thanks for taking a look. I *think* that they're the same. I'm just following the example code in the book, and create the apps only once, during #initialize. Fileout attached. I created category "SEG-StTutToDoApp". Your help is greatly appreciated. Thanks, Steve _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Steven Greenberg
Hi!
Your children method returns only the second value (listComponent) You must use "Array with: with:" instead of the cascade! br Gerhard children | a | a := Array with: menuComponent; with: listComponent. ^ a On Thu, Oct 16, 2008 at 5:29 PM, Steven Greenberg <[hidden email]> wrote: Hi Randal. Thanks for taking a look. _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |