Sandy has asked for the wisdom of the Perl Monks concerning the following question:
I am used to Perl/Tk, with sample code that looks like
use Tk; my $mw = MainWindow->new(-title=>"hello world"); $mw->Label(-text=>"hello")->pack(); $mw->Button(-text=>"Exit",-command=>sub{exit})->pack(); MainLoop;
Now I am updating (?) to Tcl::Tk (because Perl/Tk requires Quartz on my Mac)
use Tcl::Tk; my $int = new Tcl::Tk; my $mw = $int->mainwindow; $mw->Label( -text => "Hello World!" )->pack(); $mw->Button( -text => "Exit", -command => sub { exit } )->pack(); $int->MainLoop;
But when I exit, I get the following error message (and a segmentation fault)
perl5.18 quit unexpectedly while using the Tk plug-in.
I have tried combinations of $mw->exit(), but that also doesn't work.
Help.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tcl::Tk exit
by tybalt89 (Monsignor) on May 24, 2017 at 19:13 UTC | |
by Sandy (Curate) on May 24, 2017 at 20:44 UTC | |
|
Re: Tcl::Tk exit ( Tcl::pTk )
by Anonymous Monk on May 24, 2017 at 23:36 UTC | |
by Sandy (Curate) on May 27, 2017 at 15:43 UTC | |
by kcott (Archbishop) on May 28, 2017 at 07:32 UTC | |
by Sandy (Curate) on May 29, 2017 at 02:07 UTC | |
by choroba (Cardinal) on May 28, 2017 at 07:19 UTC | |
by Anonymous Monk on May 28, 2017 at 00:55 UTC | |
|
Re: Tcl::Tk exit
by chrstphrchvz (Scribe) on May 09, 2019 at 22:14 UTC |