Version 0 of Small tool for the after command

Updated 2004-04-01 08:16:56

Arjen Markus (1 april 2004) When using the after command to create an animated display, I often come up with a pattern like this:

 proc myproc { arg1 arg2 ... } {
    ... do some processing ...

    # The animation bit
    if { ... another step reauired? .... } { 
       after 1000 [list myproc $arg1 $arg2 ...]
    }
    return
 }

For a lazy programmer like me that is too much work:

  • Repeat the name of the procedure
  • Construct a list for the after command with the right arguments (a repetition of the proc's header)
  • What if I need another list of arguments or change the namespace?

So, I came up with this little tool ...