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

Unfortunately it didn't work;
bad option "repeat": must be cget or configure at Ikon.pl line 82.
I guess that there's a equivalent for Tkx?
The closest I got was http://www.mail-archive.com/tcltk@perl.org/msg00220.html . Maybe that's correct?

Replies are listed 'Best First'.
Re^3: Simple Tkx loop question
by zentara (Cardinal) on Feb 23, 2010 at 11:57 UTC
    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
      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.