laziness, impatience, and hubris | |
PerlMonks |
Re: PERL / Tk MainWindow -> new and destroy(), vs. $mw-> withdraw() and raise().by jcb (Parson) |
on Apr 13, 2020 at 02:38 UTC ( [id://11115411]=note: print w/replies, xml ) | Need Help?? |
The Tk MainLoop returns when all MainWindows are destroyed. If you want to be able to merely withdraw the MainWindow, you will need to move the effects of lines 27 and 28 into Tk callback handlers. The program is hanging when the MainWindow is withdrawn because it reaches a state where no GUI elements are present, but Tk is still waiting for events — deadlock!
In Section
Seekers of Perl Wisdom
|
|