in reply to Re^2: Simple Tkx loop question
in thread Simple Tkx loop question

You just gave some pseudo code, and so did I. I don't have Tkx running, nor have knowledge of it's exact syntax. You asked how do I get this running in the mainloop. The answer is a timer.... how Tkx implements timers is up to you to find out. Maybe google for "perl Tkx timer", the first hit shows how to do it.... they call it a Tkx::after

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

Replies are listed 'Best First'.
Re^4: Simple Tkx loop question
by David S (Sexton) on Feb 23, 2010 at 18:41 UTC
    Something like the following will work:
    # After 100ms call my_routine(). Tkx::after(100, sub { my_routine(); }); Tkx::MainLoop();

    Also, if you need a good tutorial on Tkx, check out

    http://www.tkdocs.com/tutorial/

    There are lots of examples and each example is shown in Tcl, Ruby, Perl, and Python.

      Thanks, that solved it:-) I will have a look at the tutorial.