[Seaside] tables

Avi Bryant avi at beta4.com
Sat Mar 22 09:24:54 CET 2003



On Fri, 21 Mar 2003, Nevin Pratt wrote:

> Does anybody else find tables rather clutsy to deal with?  For example...
>
> html table: [html
>     tableRow: [html
>         tableData: [html
>             bold: [html
>                 text: 'this is a test'
>             ]
>         ]
>     ]
> ].

I would write this as

html table: [
  html tableRowWith: [html bold: 'this is a test'].
]

Perhaps not a huge improvement, but it brings it into the realm of
manageability.

I believe the usual spelling is "klutzy", btw, but my Yiddish isn't very
good ;).

> I noticed these #labelledRowFor... methods in WAHtmlRenderer, but I'm
> not sure how I would use them, if *if* I could use them, to simplify
> table coding.

They're useful for quickly creating simple forms.  Take a look, for
example, at WSMCardEditor, which represents a large table full of text
inputs pretty compactly:

html table: [
  html
    labelledRowForTextInputOn: #name of: card;
    labelledRowForTextInputOn: #summary of: card;
    labelledRowForTextInputOn: #description of: card;
    tableRowWith: [html space];
    labelledRowForTextInputOn: #author of: card;
    labelledRowForTextInputOn: #maintainer of: card;
    ....
]

> Anybody got any suggestions? (like, maybe swear off tables completely,
> and use something else entirely?  like what?)

CSS box layout, which in theory is the wave of the future, but for now I
can't figure out how to make it do half the things tables can do...

Avi



More information about the Seaside mailing list