Re: Re: HTML_Table: thead, tfoot and tbody
| From: | Mark Wiesemann | Date: | Wed, 03 Aug 2005 09:18:25 +0000 |
| Subject: | Re: Re: HTML_Table: thead, tfoot and tbody | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-39157@lists.php.net to get a copy of this message | ||
Hi Bertrand,
> I suggest you just create an HTML_Table2 package. Even if the API is
> not different, adding such features will add so much to the code that
> it is IMO justified to go for a new major version.
I don't see that much of new code in the current version, especially
when using my idea with the two new parameters for toHtml(). No other
function needs to be modified (except from Christians second feature
request [allow arrays as $content in set...Contents()]).
> In terms of implementation, having 3 different structure arrays, 1
> for thead, tfoot and tbody, will make it easier to manage. This way,
> using setHeaderContents() or setBodyContents() (an alias of
> setCellContents()), you won't have to remember where your header
> stops and where your body starts. Every section starts at row 0, col
> 0.
That's right. It is also more logical, when each section has its own row
numbers.
> Problems might be with col/row spans, any ideas ?
With a HTML_Table2 package one could throw a PEAR::Error in the case
that a row span overlaps two groups (if this would even be possible with
the behaviour described above). Col spans shouldn't be a problem, they
always will be in the same group. And for row spans: If <tbody> has 5
rows and the user wants a row span over 6 rows then <tbody> could be
expanded with 1 row (with autoGrow enabled).
Mark