Ron Jeffries <ronjeffries / acm.org> writes:

> >     ant_drawer = proc {
> >       x = rand(20)
> >       y = rand(20)
> >       color = %w{ red green blue white }[rand(4)]
> >       farm.drawAntAt(x, y, color)
> >       Tk.after(500, &ant_drawer)
> >     }

> Check me here, please? This is recurring infinitely, not just looping,
> right? 

I believe it's looping: it posts an event to have itself rescheduled,
and then exits. 50mS later, the event pops, and round we go again.

There's probably a repeated event thingy for Tk, but I haven't used Tk
much, so I'm kinda stuck with the M. Mouse version above.


Dave