That dosn't sound right. You may have a Tk version that needs patching, or you are doing something weird like trying to access a widget packed in the toplevel, after you destroy the toplevel.
If you want to be happy with Tk, stop using destroy to eliminate windows. To exit gracefully, use plain old "exit" or "Tk::exit", they clean up. If you use $mw->destroy, you may be leaving the calling shell alive. Of course, that may be useful in certain circumstances.
#!/usr/bin/perl -w use Tk; my $mw = MainWindow->new(-title=>"#1"); $mw->Button(-text=>"Destroy Me", -command=> sub { $mw->destroy })->pack; $mw->Button(-text=>"Exit Me", -command=> sub { Tk::exit })->pack; MainLoop; print "ha ha still going\n"; <>;
In reply to Re^3: Getting segfaults when destroying and recreating Tk box
by zentara
in thread Getting segfaults when destroying and recreating Tk box
by skt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |