in reply to Perl/Tk: recursive "after" method issue

The after method only executes once. So you count up to 5, each time reiniting the timer. The 6th time, you decrease level, but don't reinit the timer. So after it prints the last 4, there is no timer going. Use repeat to keep it repeating.

Just for your information, the way Gtk2 does timers, is the timer will keep going if it's callback returns TRUE, or the timer will stop if the timer's callback returns FALSE.


I'm not really a human, but I play one on earth. flash japh
  • Comment on Re: Perl/Tk: recursive "after" method issue