« Return to Thread: #render: or #call: components.

RE: #render: or #call: components.

by Ramon Leon-5 :: Rate this Message:

Reply to Author | View in Thread

>
> I know that this is probably a very bad practice, but I have
> initialized component, eg. a instance variable 'bodyComp'
>  
> ok, I will show some code:
>  
> RootComponent>>initilaize
>    super initialize.
>    self bodyComp: BodyComponent new.
>  
> RootComponent>>renderContentOn: html
>    "all the head stuff"
>     bodyComponent renderContentOn: html
>     "etc."
>  

Don't do that, you should render subcomponents with #render:, never call
renderContentOn: of another component.

RootComponent>>renderContentOn: html
     html render: bodyComponent

Ramon Leon
http://onsmalltalk.com

_______________________________________________
seaside mailing list
seaside@...
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

 « Return to Thread: #render: or #call: components.