Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to PERL / Tk MainWindow -> new and destroy(), vs. $mw-> withdraw() and raise().

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!

Replies are listed 'Best First'.
Re^2: PERL / Tk MainWindow -> new and destroy(), vs. $mw-> withdraw() and raise().
by Anonymous Monk on Apr 13, 2020 at 13:53 UTC

    As you suggested I moved those subroutine calls to the end of my keyPressMainGUI handler and now everything works fine. Thanks so much!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11115411]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-26 07:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found