RE: Nested tables
"pbc" <[email protected]>
| Newsgroups | gmane.comp.gcc.cgicc.general |
|---|---|
| Message-ID | <000901c1d5ec$99d81d40$52fd4cd5@demon> |
>From: "Stephen F. Booth" <[email protected]> >To: "'Geir Pedersen - Activio AS'" <[email protected]>, > <[email protected]> >Subject: RE: Nested tables >Date: Wed, 20 Mar 2002 23:43:29 -0500 > <cut> >render itself in the destructor. This approach was suggested by David >McCombs, and is good, except that it is >almost fully incompatible with the current scheme. The code might look >like >/* create a table */ >{ > table(cout); > { > tr(cout); > { > /* inner table */ > table(cout); > tr(cout).add(td("inner table")); > } > } > { > tr(cout); > td(cout).add(td("outer table")); > } >} /* end table */ I personally think this is a little confusing- it took me a while to figure out the example above! And I haven't fully thought it through yet. But it is an alternative. Nested elements (not only talbes) are very needed as can be seen from many posts. The above solution looks good and it's so "close" to writting pure html as it can get in C++, IMHO. I think everybody can get used to it rather easy (after a while) and after that it seems to be much more natural. As to compatibility with earlier versions of cgicc - deafult parameter in HTMLElement constructor (..., bool Scope = cgicc::options::Scope) will do it just fine. Options could be namespace with global options and the Scope option could be false by default. This way we don't break existing source and introducing new functionality at the same time. What do you think ? As always, I'm open to suggestions. I'm glad you are. Are you going to fix source according to Alexander J. Oss's suggestions ? -- Piotr Dobrogost -- Okresl Swoje potrzeby - my znajdziemy oferte za Ciebie! [ http://oferty.onet.pl ]