The Problem:
I'm using TableMatrix to store some data and I need some of the cells to span rows. Everything works fine if I span rows in the middle of the table, but it breaks if I try to span a cell in the last column to the end of the table. When this happens the last row and column both disappear from the table.

The Example:
I worked for a while isolating the cause of the disappearing cells and here is a very simple example of the problem:

#!/usr/local/bin/perl5 -w # Use Perl 5 with warnings # Simple TableMatrix Bug Example # Using ActiveState Perl v5.6.1 # Build 628 use strict; use Tk; use Tk::TableMatrix; my $main = new MainWindow; my $table = $main->TableMatrix()->pack( -side => 'top' ); # Description of the "spans" method from http://www.perldoc.com/cpan/T +ableMatrix.html # $table->spans(?index?, ?rows,cols, index, rows,cols, ...?) #$table->spans("0,8", "9,0"); # Works fine. Cell 0,8 spans down 10 + rows of the table. #$table->spans("0,9", "8,0"); # Works fine. Cell 0,9 spans down 9 + rows of the table. $table->spans("0,9", "9,0"); # Table breaks. Last row and column +disappear. MainLoop;

If anyone could test this on something other than ActiveState's build I'd appreciate it. I've downloaded the latest versions of Tk and TableMatrix as well.

Thanks Monks.

-----------------------------------
Washizu
Acoustic Rock


In reply to TableMatrix Bug? by Washizu

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.