Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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 contemplating the Monastery: (4)
As of 2026-01-21 19:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (125 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.