Weird Idle behavior

Chris Carroll-Davis chris at carroll-davis.co.uk
Mon Mar 27 13:25:28 EST 2006


Hello folks -

here's a weird one...  I'm updating a timer on idle:

On idle
   global StartTicks
   if StartTicks = "" then exit idle
   updateTimer
   wait 1 millisecond with messages -- attempt at kludge!
end idle

which just draws an arc graphic to give visual feedback

On updateTimer
   global StartTicks, timeLimit
   If StartTicks = "" then exit UpdateTimer
   put 180+(180/(timeLimit * 60) * (the ticks - StartTicks)) into a
   set the startangle of grc "timer" to a
   if a >= 360 and StartTicks <> "" then
     TimesUp
     exit updateTimer
   end if
end updateTimer


This goes along fine, timing out after the timelimit ... except that  
it doesn't update the display!!    If I call "updateTimer" from a  
repeat loop, it works fine.  Has anyone come across this before?  
Anyone got a workaround!?


Chris


More information about the use-livecode mailing list