Hi!!
I'm wondering what's the best option to navigate a series of components in GLASS. For instance, i'm developing a solution using anchors, and the callbacks use the #call: message to render the next component. But this makes me worry about the stack. Won't it grow indefintely and eventually crash my application? I'm never giving an #answer, because I don't know if the user will go back to the previous component. For example, the user might be on one called component, and navigate via menu to another component that's not related to the previous one. So, what's the best way to navigate components in seaside? Would using a Task be a good approach? Any suggestions on how to do this? I'm kinda stuck here... Many thanks in advance!!! |
Hi,
The approach I use is to have a 'main' component that basically has a single child component and use the anchor callbacks to change the child component. See http://seaside.gemstone.com/tutorial/chapter10.pdf for an example in my tutorial. James Foster On Aug 29, 2011, at 2:12 PM, keropotter wrote: > Hi!! > > I'm wondering what's the best option to navigate a series of components in > GLASS. For instance, i'm developing a solution using anchors, and the > callbacks use the #call: message to render the next component. > > But this makes me worry about the stack. Won't it grow indefintely and > eventually crash my application? I'm never giving an #answer, because I > don't know if the user will go back to the previous component. For example, > the user might be on one called component, and navigate via menu to another > component that's not related to the previous one. > > So, what's the best way to navigate components in seaside? Would using a > Task be a good approach? Any suggestions on how to do this? I'm kinda stuck > here... > > Many thanks in advance!!! > > -- > View this message in context: http://forum.world.st/Component-navigation-tp3777414p3777414.html > Sent from the Seaside General mailing list archive at Nabble.com. > _______________________________________________ > 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 |
Announcements. They can be used with James' method, too.
RS > Subject: Re: [Seaside] Component navigation > From: Smalltalk@JGFoster.net > Date: Mon, 29 Aug 2011 14:31:47 -0700 > To: seaside@lists.squeakfoundation.org > > Hi, > > The approach I use is to have a 'main' component that basically has a single child component and use the anchor callbacks to change the child component. See http://seaside.gemstone.com/tutorial/chapter10.pdf for an example in my tutorial. > > James Foster > > On Aug 29, 2011, at 2:12 PM, keropotter wrote: > > > Hi!! > > > > I'm wondering what's the best option to navigate a series of components in > > GLASS. For instance, i'm developing a solution using anchors, and the > > callbacks use the #call: message to render the next component. > > > > But this makes me worry about the stack. Won't it grow indefintely and > > eventually crash my application? I'm never giving an #answer, because I > > don't know if the user will go back to the previous component. For example, > > the user might be on one called component, and navigate via menu to another > > component that's not related to the previous one. > > > > So, what's the best way to navigate components in seaside? Would using a > > Task be a good approach? Any suggestions on how to do this? I'm kinda stuck > > here... > > > > Many thanks in advance!!! > > > > -- > > View this message in context: http://forum.world.st/Component-navigation-tp3777414p3777414.html > > Sent from the Seaside General mailing list archive at Nabble.com. > > _______________________________________________ > > seaside mailing list > > seaside@lists.squeakfoundation.org > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > > > > _______________________________________________ > seaside mailing list > seaside@lists.squeakfoundation.org > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by keropotter
On 08/29/2011 02:12 PM, keropotter wrote:
> Hi!! > > I'm wondering what's the best option to navigate a series of components in > GLASS. For instance, i'm developing a solution using anchors, and the > callbacks use the #call: message to render the next component. Use #show: instead of #call:, only use #call: when you intend to #answer. -- Ramon Leon http://onsmalltalk.com _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by keropotter
2011/8/29 keropotter <[hidden email]>:
> Hi!! > > I'm wondering what's the best option to navigate a series of components in > GLASS. For instance, i'm developing a solution using anchors, and the > callbacks use the #call: message to render the next component. > > But this makes me worry about the stack. Won't it grow indefintely and > eventually crash my application? No, the stacks are not joined together and only a limited set of continuations is kept. > I'm never giving an #answer, because I > don't know if the user will go back to the previous component. For example, > the user might be on one called component, and navigate via menu to another > component that's not related to the previous one. If you're just changing the 'main' content component then see the answers of James and Robert. Cheers Philippe _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Thank you all very much! You've been of great help!
I'll focus on James and Robert approaches, although I'm not sure what Announcements are. I'll search some info on that =) Thanks you again!! Alejandro On Tue, Aug 30, 2011 at 8:29 AM, Philippe Marschall <[hidden email]> wrote: 2011/8/29 keropotter <[hidden email]>: _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> I'll focus on James and Robert approaches, although I'm not sure what
> Announcements are. I'll search some info on that =) This should help: http://book.seaside.st/book/components/embedding/coupling _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
This is the method I use, although there are plenty of uses: super initialize. announcer := Announcer new. WASession#on: announcement send: method to: object announcer on: announcement send: method to: object AnAnnouncementSubclass class #on: payLoad ^(self new) payload: payLoad; yourself. AComponent#initialize super initialize. self session on: AnAnnouncementSubclass send: #onChangeContent: to: self. AComponent#children ^Array with: self content. AComponent#onChangeContent: anAnnouncement self content: anAnnouncement payload. Then call it this way: self session announce: (AnAnnouncementSubclass on: WACounter new). RS > Date: Tue, 30 Aug 2011 16:26:17 +0200 > From: [hidden email] > To: [hidden email] > Subject: Re: [Seaside] Component navigation > > > I'll focus on James and Robert approaches, although I'm not sure what > > Announcements are. I'll search some info on that =) > > This should help: > http://book.seaside.st/book/components/embedding/coupling > _______________________________________________ > 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 |