http://qs321.pair.com?node_id=643687

g0n has asked for the wisdom of the Perl Monks concerning the following question:

I may be missing something hugely obvious here, but in the following simple test case:

use strict; use warnings; use Tk; my $mw = MainWindow->new(); my $frame = $mw->Frame->pack(); populate(); $frame->Button(-command=>\&recompose)->pack(); MainLoop; sub recompose { $frame->destroy(); $frame = $mw->Frame->pack; populate() } sub populate { for (1..10) { $frame->Label(-text=>$_)->pack(); } }

clicking the button makes the main window resize itself to absolute minimal size (so the numbers can't be seen). To see the numbers the window has to be manually resized. Is this supposed to happen? Is there a call I can make to get the MainWindow to programmatically resize based on its new contents?

TIA

Update: liverpole has pointed out by /msg that he isn't having this problem, and at that point I suddenly remember I'm running cvs Tk on Perl 5.9.5, which might explain the odd behaviour (OS is Debian Etch). Does anyone else not see the numbers 1..10 after clicking on the button? I've reworded the question a bit to try and make the problem clearer.

Update: zentara has rightly pointed out that I probably shouldn't be doing this anyway.

--------------------------------------------------------------

"If there is such a phenomenon as absolute evil, it consists in treating another human being as a thing."
John Brunner, "The Shockwave Rider".