Skip Menu |

This queue is for tickets about the HTML-Table CPAN distribution.

Report information
The Basics
Id: 34501
Status: open
Priority: 0/
Queue: HTML-Table

People
Owner: a.peacock [...] chime.ucl.ac.uk
Requestors: colin.fine [...] pace.co.uk
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.06
Fixed in: (no value)



Subject: Unclarity between row-level and all-cells-per-row operations
Some of the 'setRowXxxx' functions operate on the <tr>, whereas others call setCellXxxx on each cell individually. Specifically Align, Style, Class, VAlign, NoWrap, BGColor, Attr appear to set the properties at the TR level, whereas Head, Width, Height, Format do loop over the cells. But the documentation in every case says 'Applies setCellXxxx' over the whole row, which is wrong in most cases. Furthermore, though the choices in the lists above are generally right, there are some instances where it would be desirable to have the alternative approach. Specifically, I want to be able to set Class and Style either for the row or for all the cells.
I can fix the documentation quickly. For those attributes that can be applied at TR or TD/TH level, I will need to think about names for the methods, that are backwards compatible and make sense. To be consistent with other naming conventions in the module all setRowxxx methods should apply attributes to the TR tag. Methods that apply settings to TD/TH tags across a whole row should be called setRowCellsxxx. For backwards compatibility the existing methods should remain as 'aliases' to the newly named methods. What do you think about these names?
On Thu Apr 10 06:41:12 2008, AJPEACOCK wrote: Show quoted text
> I can fix the documentation quickly. > > For those attributes that can be applied at TR or TD/TH level, I will > need to think about names for the methods, that are backwards compatible > and make sense. > > > To be consistent with other naming conventions in the module all > setRowxxx methods should apply attributes to the TR tag. > > Methods that apply settings to TD/TH tags across a whole row should be > called setRowCellsxxx. For backwards compatibility the existing methods > should remain as 'aliases' to the newly named methods. > > What do you think about these names?
Actually for compactness I am now favouring setRCellsxxx
The documentation has now been fixed to correctly describe those methods that set a Row attribute (TR) from those that set Cell attributes across a row. The methods that apply attributes across the row have now been renamed to setRCellsxxx to clearly identify the difference. For the current methods the setRowxxx method remains as an 'alias' to the new method, and has been marked as deprecated in the comments and documentation. This now leaves room to add new methods that apply attributes to Cells across a row, that already have a method for a Row. These new methods have not yet been set up, so I will leave this ticket open for now.