Weird Idle behavior
J. Landman Gay
jacque at hyperactivesw.com
Mon Mar 27 16:17:06 EST 2006
Chris Carroll-Davis wrote:
> 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!?
Works okay here, after I set the arcAngle to something other than a circle.
This is really a job for the "send" command though. If you send the
message only once per second you won't get all that extra stuff in the
pendingmessages.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list