[Seaside] #render: and #children. What if I don't?

jtuchel at objektfabrik.de jtuchel at objektfabrik.de
Fri Oct 17 05:39:40 UTC 2014


Johan already gave a complete answer.
I seem to remember, however, that there is one minor additional case for 
#children: if you want to use halos on that child component at 
development time.
Back in the days when I used to use halos to learn Seaside, I think 
non-children weren't decorated with halos.


Am 16.10.14 um 18:43 schrieb Mariano Martinez Peck:
> Hi guys,
> From what I understand, if we have a component called X which, as part 
> of the #renderConentOn: (or derivative), does:
> ComponentX >> renderContentOn: html
> html render: self componentY
> Then we need to add componentY to the #chidlren:
> ComponentX >> children
> ^ Array with: self componentY
> So..not the question is...it seems in some places I forgot to add it 
> to #chidlren and the component still render correctly. At the same 
> time, I remember once I was fighting to find a bug and it was exactly 
> because I forgot to add the component to #children. So... what exactly 
> happens if I DON'T add the component as a #children? What does it get 
> broken?
> The second question is...is a bit of a pain the #children. Why? 
> Because I must store the component somewhere...which I may not 
> requiere that. For example, if I have this code:
> html render: (MyWebMessageComponent new errorMessage: 'Problem with 
> xxxx'; yourself)
> then I must define an instVar for that component, assign to it before 
> render, and then render...
> so the second question is...for this type of component that I render 
> only "once" (the component is instantiated as part of the rendering 
> phase and dead after), do I also have to add it to #children?
> Thanks in advance for any clarification.
> -- 
> Mariano
> http://marianopeck.wordpress.com
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

Objektfabrik Joachim Tuchel          mailto:jtuchel at objektfabrik.de
Fliederweg 1                         http://www.objektfabrik.de
D-71640 Ludwigsburg                  http://joachimtuchel.wordpress.com
Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20141017/33a7a23d/attachment-0001.htm

More information about the seaside mailing list