The Perl-Tk version is 804.027 and here is one of the scripts which misbehaves; as you can see, it's an exercise answer from one of the earlier chapters -
#!/usr/bin/perl -w # 123ex1 - Combination of Entry and Label widgets. # Another segmentation fault; that's interesting. # # Setting the Label width forces the widget to scroll, # otherwise it will expand the window x-wise to # accomodate the extra text. Try -wraplength also. use Tk; use strict; my $message; my $mw = MainWindow->new; $mw->title("Label following Entry"); $mw->Label(-textvariable => \$message, -width => 40) ->pack(-side => 'bottom', -fill => 'x',); my $e = $mw->Entry(-textvariable => \$message) ->pack(-expand => 1, -fill => 'x'); MainLoop;
I agree, the book is well out of date, but it was a cheap 'pre-loved' deal on Amazon. I've already give up on the book as a tutorial. Thanks for the advice about GTk2 - I may just follow that up.
In reply to Re^2: Perl/Tk exit trouble?
by Hengist
in thread Perl/Tk exit trouble?
by Hengist
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |