Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: displaying program status in perl tk

by boblawblah (Scribe)
on Feb 04, 2009 at 22:00 UTC ( [id://741432]=note: print w/replies, xml ) Need Help??


in reply to Re^2: displaying program status in perl tk
in thread displaying program status in perl tk

Putting this code in your loop should do the trick. I haven't tested it.
while(1) { last unless DoOneEvent($TK_DONT_WAIT); }
DoOneEvent is the routine called from MainLoop.

When passed the exported variable $TK_DONT_WAIT it returns true if there was an event to process, and false if otherwise. So DoOneEvent will continue to be called until there are no more events pending (and the only event pending would be the updating of your status bar). Then your program would continue on where it left off.

Read more about the main loop here.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-19 12:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found