Weird Idle behavior

Chris Carroll-Davis chris at carroll-davis.co.uk
Mon Mar 27 14:41:50 EST 2006


Richard -

Thanks.

Ha!  Yes, I saw that - but I'm an old SC dinosaur so I tend to stick  
with what I know!  I suppose I'll have to make the switch to timed  
messages.

But do you agree that my script *ought* to work?  One of the great  
things about rev is the ability to use a variety of approaches, so  
it's really annoying when you are forced to work in a specific way...

Chris




On 27 Mar 2006, at 19:57, Richard Gaskin wrote:

> From the Transcript Dictionary entry for the idle message:
>
> -----------------------------------------------------------
>
> Note:  Usually, it is easier and more efficient to use the send in  
> time form of the send command than to use an idle handler,  
> especially if a task needs to be executed at regular intervals.  
> This example shows an idle handler that updates a clock timer:
>
>   on idle -- avoid if possible
>     global startTime
>     if the seconds > startTime + 60 -- 60 seconds have gone by
>       put the time into field "Clock Face"
>       put the seconds into startTime
>     end if
>     pass idle
>   end idle
>
> The following example does the same thing more efficiently, since  
> it only needs to handle a single message every sixty seconds:
>
>   on updateClock -- a better way
>     put the time into field "Clock Face"
>     send "updateClock" to me in 60 seconds
>   end updateClock
>
>
>
> --
>  Richard Gaskin
>  Managing Editor, revJournal
>  _______________________________________________________
>  Rev tips, tutorials and more: http://www.revJournal.com
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the Use-livecode mailing list