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

Re^2: Perl/Tk Message buffering

by martyandpeg (Initiate)
on Dec 15, 2010 at 16:21 UTC ( [id://877300]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl/Tk Message buffering
in thread Perl/Tk Message buffering

This is a snippet of the code I was referring to. I was just starting to look at DoOneEvent(), but it did not seem to help. if ($progress_count eq '500') { print "Records processed : $record_1_count \n"; $txt -> insert('end',"Records processed : $record_1_count \n"); $progress_count = 0; DoOneEvent(); }
A mainframe programmer trying to do Perl!

Replies are listed 'Best First'.
Re^3: Perl/Tk Message buffering
by SuicideJunkie (Vicar) on Dec 15, 2010 at 18:19 UTC

    Note: Use <code></code> tags around your code to keep it legible.

    One single event isn't enough to react to updates and repaint the whole window among responding to all the minor events Windows may throw at your app. Put the DoOneEvent inside the loop you didn't show, rather than the if. That way, you'll interleave small bits of GUI action between record processing, and they'll both share the CPU.

    Also, look up the parameters for DoOneEvent to find the best set of options for your situation. Not waiting if there are no pending events, for example.

Re^3: Perl/Tk Message buffering
by lamprecht (Friar) on Dec 15, 2010 at 18:10 UTC
    $txt->update
    Cheers, Christoph

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2026-05-11 21:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    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.