PeterPeiGuo has asked for the wisdom of the Perl Monks concerning the following question:
I accidentally mixed pack and grid in one Tk program, and the program just hung, and even the main window didn't show. Following is a simplified version to show this:
use warnings; use strict; use Tk; my $mw = new MainWindow(); $mw->Button()->grid($mw->Button()); $mw->Button()->pack(); MainLoop;
However that is not always the case, for example the following version, although it does not neccessarily do what one wants, it at least does not hang:
use warnings; use strict; use Tk; my $mw = new MainWindow(); $mw->Button()->grid(); $mw->Button()->pack(); MainLoop;
Just curious, does anybody know a way, to force Tk at least show an error or warning in similar situations, to ease the debug? Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: pack and grid
by vkon (Curate) on Feb 13, 2011 at 09:27 UTC |