Subject: | Similar to bug 37028 |
Appears to be a similar issue as 37028. Im basically following along a
tutorial for tcl/tk which gives both the code in tcl and in perl. The
examples are based on Tkx (according to the documentation)
http://www.tkdocs.com/tutorial/morewidgets.html
could you give me any advice as to how I would go about determining
which modules I need to load, or maybe where I can find what is
available?
Thanks
Keith
invalid command name "tk::frame" at
C:\powervue\qa\tests\include\hello.pl line 5.
When I use the TCL equivalent, the TCL version works fine.
Environment:
XP w/sp2
TKx 1.04
ActivePerl-5.10.0.1003
ActiveTcl8.5.2.0.284846
Perl code:
use Tkx;
Tkx::package_require('tile');
my $mw = Tkx::widget->new(".");
($lb = $mw->new_tk__listbox(-height => 5))->g_grid(-column => 0, -row
=> 0, -sticky => "nwes");
($s = $mw->new_ttk__scrollbar(-command => [$lb, "yview"],
-orient => "vertical"))->g_grid(-column =>1, -row => 0, -sticky
=> "ns");
$lb->configure(-yscrollcommand => [$s, "set"]);
($mw->new_ttk__label(-text => "Status message here",
-anchor => "w"))->g_grid(-column => 0, -row => 1, -sticky
=> "we");
($mw->new_ttk__sizegrip)->g_grid(-column => 1, -row => 1, -sticky
=> "se");
$mw->g_grid_columnconfigure(0, -weight => 1); $mw->g_grid_rowconfigure
(0, -weight => 1);
for ($i=0; $i<100; $i++) {
$lb->insert("end", "Line " . $i . " of 100");
}
Tkx::MainLoop();
tcl code
grid [tk::listbox .l -yscrollcommand ".s set" -height 5] -column 0 -row
0 -sticky nwes
grid [ttk::scrollbar .s -command ".l yview" -orient vertical] -column
1 -row 0 -sticky ns
grid [ttk::label .stat -text "Status message here" -anchor w] -column
0 -row 1 -sticky we
grid [ttk::sizegrip .sz] -column 1 -row 1 -sticky se
grid columnconfigure . 0 -weight 1; grid rowconfigure . 0 -weight 1
for {set i 0} {$i<100} {incr i} {
.l insert end "Line $i of 100"
}