On Tue, Jan 29, 2008 at 05:56:14PM -0700, Timothy McDowell wrote:
> Whenever I put the command 'sleep' into my code, it 'sleeps' the whole
> Shoes app before start, so...
I should replace sleep with a one-shot timer. Sleep doesn't work
with Shoes apps because the GUI is basically in the main thread.
Here's a possible way to use a thread to do the sleep:
@anim = animate(6) do
hi.replace variable1.to_s
variable1 = variable1 + 1
if variable1 > 20
hi.replace "Too high! Starting over..."
variable1 = 1
@anim.stop
Thread.start do
sleep 5
@anim.start
end
end
end
_why