Skip Menu |

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

Report information
The Basics
Id: 33433
Status: resolved
Worked: 2 hours (120 min)
Priority: 0/
Queue: HTML-Table

People
Owner: a.peacock [...] chime.ucl.ac.uk
Requestors: kyle.davenport [...] fmr.com
Cc:
AdminCc:

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



Subject: delRow
I need a delRow method. Example of typical usage: I am adding rows one at a time but I need to set attributes on the row _after_ it is added. This means my tests that calculate the flags are happening after addRow, but I may have a test that tells me I don't want the row afterall so that is when I need to delete the last row (the row I just added).
On Tue Feb 19 10:20:59 2008, Quickening wrote: Show quoted text
> I need a delRow method. > > Example of typical usage: > > I am adding rows one at a time but I need to set attributes on the row > _after_ it is added. This means my tests that calculate the flags are > happening after addRow, but I may have a test that tells me I don't > want the row afterall so that is when I need to delete the last row > (the row I just added).
As a workround, how about hiding the row? $table->setRowStyle($rowno, 'display:none');
Subject: RE: [rt.cpan.org #33433] delRow
Date: Fri, 28 Mar 2008 08:57:29 -0500
To: <bug-HTML-Table [...] rt.cpan.org>
From: "Davenport, Kyle" <kyle.davenport [...] fmr.com>
: ) Yes, tried that already! It leaves a row margin or padding, so a bunch of hidden rows look like large blank spaces in the table. Kyle Show quoted text
-----Original Message----- From: Colin Fine via RT [mailto:bug-HTML-Table@rt.cpan.org] Sent: Friday, March 28, 2008 4:58 AM To: Davenport, Kyle Subject: [rt.cpan.org #33433] delRow <URL: http://rt.cpan.org/Ticket/Display.html?id=33433 > On Tue Feb 19 10:20:59 2008, Quickening wrote:
> I need a delRow method. > > Example of typical usage: > > I am adding rows one at a time but I need to set attributes on the row
> _after_ it is added. This means my tests that calculate the flags are
> happening after addRow, but I may have a test that tells me I don't > want the row afterall so that is when I need to delete the last row > (the row I just added).
As a workround, how about hiding the row? $table->setRowStyle($rowno, 'display:none');
Subject: Re: [rt.cpan.org #33433] delRow
Date: Fri, 28 Mar 2008 16:52:50 +0000
To: bug-HTML-Table [...] rt.cpan.org
From: Anthony Peacock <a.peacock [...] chime.ucl.ac.uk>
Hi, I haven't forgotten about these. Things are calming down a bit in my day job, so I am hoping to be able to spend some time looking at these requests over the next couple of weeks. Kyle Davenport via RT wrote: Show quoted text
> Queue: HTML-Table > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=33433 > > > : ) Yes, tried that already! It leaves a row margin or padding, so a > bunch of hidden rows look like large blank spaces in the table. > > Kyle > > -----Original Message----- > From: Colin Fine via RT [mailto:bug-HTML-Table@rt.cpan.org] > Sent: Friday, March 28, 2008 4:58 AM > To: Davenport, Kyle > Subject: [rt.cpan.org #33433] delRow > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=33433 > > > On Tue Feb 19 10:20:59 2008, Quickening wrote:
>> I need a delRow method. >> >> Example of typical usage: >> >> I am adding rows one at a time but I need to set attributes on the row
>
>> _after_ it is added. This means my tests that calculate the flags are
>
>> happening after addRow, but I may have a test that tells me I don't >> want the row afterall so that is when I need to delete the last row >> (the row I just added).
> > As a workround, how about hiding the row? > > $table->setRowStyle($rowno, 'display:none'); > > > > >
-- Anthony Peacock CHIME, Royal Free & University College Medical School WWW: http://www.chime.ucl.ac.uk/~rmhiajp/ "I'm in shape. - ROUND is a shape"
From: colin.fine [...] pace.co.uk
On Fri Mar 28 09:58:42 2008, Quickening wrote: Show quoted text
> : ) Yes, tried that already! It leaves a row margin or padding, so a > bunch of hidden rows look like large blank spaces in the table. >
An approach I have used in the past (before I thought of the display trick) was to spread the previous row to cover the one you want to lose, by setCellRowSpan. In fact in my derived class I have a whole load of methods to 'spread' columns and suppress empty columns that way, that I would do a different way now. Colin Fine
Subject: RE: [rt.cpan.org #33433] delRow
Date: Thu, 3 Apr 2008 11:41:06 -0500
To: <bug-HTML-Table [...] rt.cpan.org>
From: "Davenport, Kyle" <kyle.davenport [...] fmr.com>
that might work, but I have some complicated javascript that displays the table in a scrollable window. Don't think it would work if I changed rows sizes. Kyle Show quoted text
-----Original Message----- From: Colin Fine via RT [mailto:bug-HTML-Table@rt.cpan.org] Sent: Thursday, April 03, 2008 9:32 AM To: Davenport, Kyle Subject: [rt.cpan.org #33433] delRow <URL: http://rt.cpan.org/Ticket/Display.html?id=33433 > On Fri Mar 28 09:58:42 2008, Quickening wrote:
> : ) Yes, tried that already! It leaves a row margin or padding, so
a
> bunch of hidden rows look like large blank spaces in the table. >
An approach I have used in the past (before I thought of the display trick) was to spread the previous row to cover the one you want to lose, by setCellRowSpan. In fact in my derived class I have a whole load of methods to 'spread' columns and suppress empty columns that way, that I would do a different way now. Colin Fine
I have added two new methods: delRow ( row_num ) delSectionRow ( "Section", section_num, row_num ) Passing the value of -1 as row_num will delete the last row. These methods will be in version 2.08 which should be on CPAN later today.
Subject: RE: [rt.cpan.org #33433] delRow
Date: Thu, 10 Apr 2008 09:00:44 -0500
To: <bug-HTML-Table [...] rt.cpan.org>
From: "Davenport, Kyle" <kyle.davenport [...] fmr.com>
Thank you, Anthony. That really helps! Kyle Show quoted text
-----Original Message----- From: Anthony Peacock via RT [mailto:bug-HTML-Table@rt.cpan.org] Sent: Thursday, April 10, 2008 5:20 AM To: Davenport, Kyle Subject: [rt.cpan.org #33433] delRow <URL: http://rt.cpan.org/Ticket/Display.html?id=33433 > I have added two new methods: delRow ( row_num ) delSectionRow ( "Section", section_num, row_num ) Passing the value of -1 as row_num will delete the last row. These methods will be in version 2.08 which should be on CPAN later today.
On Thu Apr 10 10:46:03 2008, Quickening wrote: Show quoted text
> Thank you, Anthony. That really helps!
Version 2.08 has just been uploaded to CPAN, or the tar.gz file can be downloaded from here, if you can't wait for the CPAN mirrors to update: http://www.chime.ucl.ac.uk/~rmhiajp/htmltable/