[Seaside] Alternative to call:

Johan Brichau johan at inceptive.be
Sat Mar 28 09:35:19 UTC 2015


Hi Jeff,

Mind that #call: is documented in Seaside to “replace the receiving component with the argument component”. So, the receiver of #call: is equally important as its argument. 

Sending #call: to the session presenter is something you can do indeed. It’s not a ‘wrong’ way to do it (imho), but I think it's cleaner to parameterize your component with the component it should replace when using #call:.
Components are intended to be reusable and if some of the callbacks they render are intended to replace another component (e.g. toplevel), then it’s a dependency of the component. So, I would add an instance variable to your component that you assign when you instantiate the component. In your use case, you would pass the toplevel component when instantiating. Immediately, you have made your component more reusable as well, which is the core concept in Seaside ;)

cheers
Johan


> On 28 Mar 2015, at 00:28, J.F. Rick <self at je77.com> wrote:
> 
> Perhaps I figured it out. I just replaced
>     self call: something
> with
>     self session presenter call: something
> It works, but it may not be the right way to do this.
> 
> Cheers,
> 
> Jeff
> 
> On Fri, Mar 27, 2015 at 7:13 PM J.F. Rick <self at je77.com <mailto:self at je77.com>> wrote:
> Maybe? :) What's a redirect? I can't really find that either. The main thing I found is this:
> http://stackoverflow.com/questions/7977179/how-do-i-simply-redirect-to-another-toplevel-seaside-component <http://stackoverflow.com/questions/7977179/how-do-i-simply-redirect-to-another-toplevel-seaside-component>
> 
> Cheers,
> 
> Jeff
> 
> 
> On Fri, Mar 27, 2015 at 1:20 PM Brad <bsselfridge at gmail.com <mailto:bsselfridge at gmail.com>> wrote:
> Would a redirect work?
> 
> Brad Selfridge
> 913-269-2385
> 
> > On Mar 27, 2015, at 11:40 AM, J.F. Rick <self at je77.com <mailto:self at je77.com>> wrote:
> >
> > This is a silly novice question but I couldn't easily find the answer in the documentation. I'm trying to open up a completely different part of my application. When I do call:, it replaces the component with the new component. I want it to replace everything. What do I do?
> >
> > Cheers,
> >
> > Jeff
> > _______________________________________________
> > seaside mailing list
> > seaside at lists.squeakfoundation.org <mailto:seaside at lists.squeakfoundation.org>
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside <http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org <mailto:seaside at lists.squeakfoundation.org>
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside <http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20150328/ddcc3491/attachment.htm


More information about the seaside mailing list