Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^2: backgrounding a Tk process

by mpersico (Scribe)
on Oct 10, 2012 at 13:24 UTC ( #998227=note: print w/replies, xml ) Need Help??

in reply to Re: backgrounding a Tk process
in thread backgrounding a Tk process

Ah. I've been building the widget in main code and just forking off the MainLoop call. I'll try it your way. Can you explain why you have two MainLoop calls?

Replies are listed 'Best First'.
Re^3: backgrounding a Tk process
by mpersico (Scribe) on Oct 10, 2012 at 13:27 UTC
    And my OTHER STUPID MISTAKE was trying to debug in ptkdb, the TK debugger. It can be done but you have to set stuff up to handle the debugger mainloop AND the program mainloop and I completely forgot about that.
Re^3: backgrounding a Tk process
by zentara (Archbishop) on Oct 10, 2012 at 14:38 UTC
    Can you explain why you have two MainLoop calls?

    Oops, it was a typo, as I tried to setup the sample script. In your case, since the main script was not a Tk app itself, it wasn't needed. The important line in the example is CORE::exit, as explained in the Caveat to perldoc Tk::exit

    I updated the example a bit, to show that if you are forking from an existing Tk GUI, the forks must be done first. Otherwise Tk just hangs.

    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://998227]
[Lady_Aleena]: choroba, the tables in that group of modules is from the World Builder's Guidebook, so I thought it best to add the name of the book to the name of the module.
[choroba]: oh, I see
[Lady_Aleena]: There is the RolePlaying:: WorldBuilding:: WorldBuildersGuide book suite and the RolePlaying:: WorldBuilding:: HighLevelCampaigns suite.

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2017-05-24 22:28 GMT
Find Nodes?
    Voting Booth?