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

Re: #render: or #call: components.

by stephane ducasse :: Rate this Message:

Reply to Author | View in Thread

Yes and follow what ramon is saying.
you should not call renderContentOn: on your own.

>>
>> 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
>

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

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

LightInTheBox - Buy quality products at wholesale price