Skip Menu |

This queue is for tickets about the Tk CPAN distribution.

Report information
The Basics
Id: 6700
Status: resolved
Worked: 5 min
Priority: 0/
Queue: Tk

People
Owner: Nobody in particular
Requestors: anthonyk [...] activestate.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Tk::Widget complains about "is not a hash" at line 190
See attached for sample script. When running the script against an older Tk, the script draws a window with a table of information and embedded widgets in some of the cells. After upgrading the Tk to the latest, this script no longer functions. The perl versions used in testing where 5.8.1 and 5.8.4 build 810. The operating system used for testing was SuSE 9.0 (Linux 2.4.21-215-default). The version of the modules were: Tk version 804.027 Tk::TableMatrix 1.01 and 1.1 Here's the error message being returned: 842d22c is not a hash at /usr/lib/perl5/site_perl/5.8.1/i586-linux-thread-multi/Tk/Widget.pm line 190. Aborted
#!/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;
From: bassklampfe
[guest - Mon Jun 21 18:47:41 2004]: Have aparently same problem with ActiveState perl (ActivePerl-5.8.4.810- MSWin32-x86.msi) and Windows 2000
RT-Send-CC: CERNEY [...] cpan.org
[guest - Mon Jun 21 18:47:41 2004]: Show quoted text
> See attached for sample script. > > When running the script against an older Tk, the script draws a window > with a table of information and embedded widgets in some of the > cells. After upgrading the Tk to the latest, this script no longer > functions. > > The perl versions used in testing where 5.8.1 and 5.8.4 build 810. > The operating system used for testing was SuSE 9.0 (Linux 2.4.21- > 215-default). The version of the modules were: > > Tk version 804.027 > Tk::TableMatrix 1.01 and 1.1
Script works fine for me With SuSE9.1 Tk804.027 and Perl5.8.4 with TableMatrix 1.1 Show quoted text
> > Here's the error message being returned: > > 842d22c is not a hash at /usr/lib/perl5/site_perl/5.8.1/i586-linux- > thread-multi/Tk/Widget.pm line 190. > Aborted >
That is the line that is trying to create a new widget. The actual message is coming from some C code somewhere. Can you comment out bits of script to findout which widget creation is failing. It is a little unusual to have a widget "manage" non-children. e.g. you have: my $l = $top->Checkbutton(-text => 'CheckButton'); $t->windowConfigure("3,3", -sticky => 's', -window => $l); Rather than: my $l = $t->Checkbutton(-text => 'CheckButton'); $t->windowConfigure("3,3", -sticky => 's', -window => $l); That might possibly create a race condition. Your BrowseEntry is similar.
On Tue Jun 29 10:14:12 2004, NI-S wrote: Show quoted text
> [guest - Mon Jun 21 18:47:41 2004]: >
> > See attached for sample script. > > > > When running the script against an older Tk, the script draws a window > > with a table of information and embedded widgets in some of the > > cells. After upgrading the Tk to the latest, this script no longer > > functions. > > > > The perl versions used in testing where 5.8.1 and 5.8.4 build 810. > > The operating system used for testing was SuSE 9.0 (Linux 2.4.21- > > 215-default). The version of the modules were: > > > > Tk version 804.027 > > Tk::TableMatrix 1.01 and 1.1
> > Script works fine for me With SuSE9.1 Tk804.027 and Perl5.8.4 > with TableMatrix 1.1 >
> > > > Here's the error message being returned: > > > > 842d22c is not a hash at /usr/lib/perl5/site_perl/5.8.1/i586-linux- > > thread-multi/Tk/Widget.pm line 190. > > Aborted > >
> > That is the line that is trying to create a new widget. > The actual message is coming from some C code somewhere. > Can you comment out bits of script to findout which widget > creation is failing. > > It is a little unusual to have a widget "manage" non-children. > e.g. you have: > > my $l = $top->Checkbutton(-text => 'CheckButton'); > $t->windowConfigure("3,3", -sticky => 's', -window => $l); > > Rather than: > > my $l = $t->Checkbutton(-text => 'CheckButton'); > $t->windowConfigure("3,3", -sticky => 's', -window => $l); > > That might possibly create a race condition. > > Your BrowseEntry is similar. >
Also no problems with perl 5.8.8 + Tk 804.027 + Tk::TableMatrix 1.22 on a FreeBSD system.
On 2006-10-30 18:54:43, SREZIC wrote: Show quoted text
> On Tue Jun 29 10:14:12 2004, NI-S wrote:
> > [guest - Mon Jun 21 18:47:41 2004]: > >
> > > See attached for sample script. > > > > > > When running the script against an older Tk, the script draws a window > > > with a table of information and embedded widgets in some of the > > > cells. After upgrading the Tk to the latest, this script no longer > > > functions. > > > > > > The perl versions used in testing where 5.8.1 and 5.8.4 build 810. > > > The operating system used for testing was SuSE 9.0 (Linux 2.4.21- > > > 215-default). The version of the modules were: > > > > > > Tk version 804.027 > > > Tk::TableMatrix 1.01 and 1.1
> > > > Script works fine for me With SuSE9.1 Tk804.027 and Perl5.8.4 > > with TableMatrix 1.1 > >
> > > > > > Here's the error message being returned: > > > > > > 842d22c is not a hash at /usr/lib/perl5/site_perl/5.8.1/i586-linux- > > > thread-multi/Tk/Widget.pm line 190. > > > Aborted > > >
> > > > That is the line that is trying to create a new widget. > > The actual message is coming from some C code somewhere. > > Can you comment out bits of script to findout which widget > > creation is failing. > > > > It is a little unusual to have a widget "manage" non-children. > > e.g. you have: > > > > my $l = $top->Checkbutton(-text => 'CheckButton'); > > $t->windowConfigure("3,3", -sticky => 's', -window => $l); > > > > Rather than: > > > > my $l = $t->Checkbutton(-text => 'CheckButton'); > > $t->windowConfigure("3,3", -sticky => 's', -window => $l); > > > > That might possibly create a race condition. > > > > Your BrowseEntry is similar. > >
> > Also no problems with perl 5.8.8 + Tk 804.027 + Tk::TableMatrix 1.22 on > a FreeBSD system.
It also does not happen with recent Tk 804.032 + Tk::TableMatrix 1.23. The sample script works fine with perl 5.8.8 on CentOS 5.10 and perl 5.18.4 on FreeBSD 9.2, so marking as resolved.