in reply to Tk on Win32
Watch the case sensitivity. The following works fine:
use Tk; my $mw = MainWindow->new; $mw->title( "Hello World" ); $mw->Button(-text => "Done", -command => sub { Tk::exit })->pack; MainLoop;
Two things to notice -- use Tk::exit to drop out, as it gives Tk time to clean up, etc. Secondly, and most importantly, tis MainLoop, not Mainloop!
Hope this helps. If not, then you might want to try reinstalling Tk. Also, try running widget.bat, which is included in the Tk install -- you should find it in the same directory that your Perl executable is in. If that doesn't work, it's a sure bet that your install is broken.
perl -e 'print "I love $^X$\"$]!$/"#$&V"+@( NO CARRIER'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Tk on Win32
by spacewarp (Pilgrim) on Apr 13, 2001 at 07:32 UTC |