Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Using sub after MainLoop with Tk

by merrymonk (Friar)
on Sep 21, 2007 at 08:07 UTC ( #640294=perlquestion: print w/ replies, xml ) Need Help??
merrymonk has asked for the wisdom of the Perl Monks concerning the following question:

With Perl/Tk I want to run a subroutine immediately after MainLoop has been ‘used’.
I found I can do this by adding a bind on to the main window that was activated whenever
the cursor was moved. This had the desired result. However, if there a more elegant way of achieving this?

Comment on Using sub after MainLoop with Tk
Replies are listed 'Best First'.
Re: Using sub after MainLoop with Tk
by strat (Canon) on Sep 21, 2007 at 08:37 UTC

    Try $mw->after( 500, \&Callback ) before calling MainLoop (see perldoc Tk::After for further details)

    Best regards,
    perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"

      Great! That worked just as I wanted it to.
      Many thanks.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://640294]
Approved by GrandFather
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2015-08-28 05:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (334 votes), past polls