[Seaside] What's the difference and why??

Philippe Marschall philippe.marschall at gmail.com
Sat Feb 25 09:21:09 UTC 2006


>         html listItem: [html anchorWithAction: [self renderMain: html]
> text: 'Home'.].
Does this really work? You do rendering in a callback block. This
doesn't make sense.

> Now, since I'm not passing in any arguments to this method (at least for
> now), I'm wondering why I need to specify "html" on the first
> version of the code (and have the ":")..
html is the rendering context on which you render. If you come from a
Java background this is very much like the #paintComponent(Graphics)
method. You can store it in an instance variable at the beginning of
#renderContentOn: instead of passing it around to every render method,
but this in general not done.

> On the second one, if I don't
> put the "self" in front of the various "html" items, I get compilation
> errors
> saying it doesn't know what they are..
Probably because there's not instance variable referncing the rendering context.

Philippe


More information about the Seaside mailing list