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 reply to Re: PERL / Tk MainWindow -> new and destroy(), vs. $mw-> withdraw() and raise().
by jcb
in thread PERL / Tk MainWindow -> new and destroy(), vs. $mw-> withdraw() and raise().
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |