Skip Menu |

This queue is for tickets about the Tkx CPAN distribution.

Report information
The Basics
Id: 37064
Status: resolved
Priority: 0/
Queue: Tkx

People
Owner: Nobody in particular
Requestors: kbernard [...] cadec.com
Cc:
AdminCc:

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



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" }
I think that tutorial assumes that your are using Tkx with Tcl/Tk 8.5. The last ActivePerl shipped with Tcl/Tk 8.4 (see what you "perldoc Tcl::tkkit" says). You should be able to set up Tkx to use Tcl/Tk 8.5 by installing ActiveTcl 8.5 and then setting the PERL_TCL_DL_PATH environment variable to to point to it. Not sure what the exact value should be on Windows. If you stay with Tcl/Tk 8.4 it looks like you get your program working by removing the "tk__" prefix from names, making it $mw->new_listbox(...) Sorry about the confusion. Not yet sure when we plan to ship 8.5 with ActivePerl.