Subject: | Tk::Tablematrix is broken in Tk 804.27 |
I'm trying to upgrade my perl installation to Activestate 5.8.8.817
which include TK 804.27. Code that references tablematrix is failing
as follows:
Had to create Tk::XlibVtab unexpectedly at
c:/Opt/Perl58/lib/DynaLoader.pm line 253.
2e029e0 is not a hash at c:/Opt/Perl58/site/lib/Tk/Widget.pm line 190.
This application has requested the Runtime to terminate it in an
unusual way.
Please contact the application's support team for more information.
I am attaching some sample code. This seems to have been reported
under Tk as bug 6700 but that was over 2 years ago. Has there been
any progress (that you know of) in fixing this bug ??
Subject: | sample.pl |
#!/usr/bin/perl
use Tk;
use Tk::BrowseEntry;
use Tk::TableMatrix;
use Data::Dumper qw( DumperX);
my $top = MainWindow->new;
my $arrayVar = {};
foreach my $row (0..20){
foreach my $col (0..10){
$arrayVar->{"$row,$col"} = "r$row, c$col";
}
}
my $t = $top->TableMatrix(-rows => 21, -cols => 11,
-width => 6, -height => 6,
-titlerows => 1, -titlecols => 1,
-variable => $arrayVar,
-selectmode => 'extended',
-resizeborders => 'both',
-titlerows => 1,
-titlecols => 1,
-bg => 'white'
);
$t->tagConfigure('active', -bg => 'gray90', -relief => 'sunken');
$t->tagConfigure( 'title', -bg => 'gray85', -fg => 'black', -relief => 'sunken');
my $l = $top->Checkbutton(-text => 'CheckButton');
$t->windowConfigure("3,3", -sticky => 's', -window => $l);
my $c = $top->BrowseEntry(-label => "Month:");
$c->insert("end", "January");
$c->insert("end", "February");
$c->insert("end", "March");
$c->insert("end", "April");
$c->insert("end", "May");
$c->insert("end", "June");
$c->insert("end", "July");
$c->insert("end", "August");
$c->insert("end", "September");
$c->insert("end", "October");
$c->insert("end", "November");
$c->insert("end", "December");
$t->windowConfigure("2,2", -sticky => 'ne', -window => $c);
$t->colWidth(2,20);
$t->colWidth(3,20);
$t->pack(-expand => 1, -fill => 'both');
Tk::MainLoop;