<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">As far as my knowledge goes about this part of the Seaside framework, #children is important in:<div>- a WATask [1]</div><div>- when you don’t override renderContentOn: (falling back to the default behavior of rendering the children)</div><div>- in combination with #states when you want to support state backtracking with the back button</div><div><br></div><div>FWIW, I know and have many components that don’t declare their children and it works fine. Of course, I’m not using any of the above in those cases.</div><div><br></div><div>Johan</div><div><br><div>[1]&nbsp;<a href="http://book.seaside.st/book/components/tasks/sequencing-components">http://book.seaside.st/book/components/tasks/sequencing-components</a><br><div><div>On 16 Oct 2014, at 18:43, Mariano Martinez Peck &lt;<a href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hi guys,<div><br></div><div>From what I understand, if we have a component called X which, as part of the #renderConentOn: (or derivative), does:</div><div><br></div><div>ComponentX &gt;&gt; renderContentOn: html</div><div>html render: self componentY</div><div><br></div><div>Then we need to add componentY to the #chidlren:</div><div><br></div><div>ComponentX &gt;&gt; children<br></div><div>^ Array with: self componentY</div><div><br></div><div>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?</div><div><br></div><div>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:</div><div><br></div><div>html render: (MyWebMessageComponent new errorMessage: 'Problem with xxxx'; yourself)<br></div><div><br></div><div>then I must define an instVar for that component, assign to it before render, and then render...</div><div><br></div><div>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?</div><div><br></div><div>Thanks in advance for any clarification.&nbsp;</div><div><br></div><div><div><br></div>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com/" target="_blank" class="vt-p">http://marianopeck.wordpress.com</a><br>
</div></div>
_______________________________________________<br>seaside mailing list<br><a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside<br></blockquote></div><br></div></div></body></html>