Avoiding mouse polls

Ken Norris (dialup) pixelbird at interisland.net
Sun Dec 15 19:19:01 EST 2002


Date: Sun, 15 Dec 2002 17:18:07 -0500
Subject: Re: Avoiding mouse polls
From: Troy Rollins <troy at rpsystems.net>

> Ken, that is the cool part. If you look closely, the handler calls
> itself in a third of a second. And every time it runs, it calls itself
> again... and again... and again. But the good part is that you can
> interrupt the cycle by testing a variable state. This particular case
> may have read -
> 
> on cycle
> change
> if myCustomState is false
> send cycle to me in 333 milliseconds
> put the result into flashingID
> end cycle
----------
Geez....of course (what is the acronym for slapping self in forehead)! I've
done the same thing in HC. I don't know why I didn't see that. Maybe because
of the "to me"...I usually have done it to other handlers. And, in fact,
because of the changes, I may do it that way (call other handlers) as well
as itself, for my purposes.

OK...I have it now. Thanks to everyone for their ideas.
----------
> It works remarkably well, and once you start using it, you will
> find lots and lots of uses for it.
----------
Sure. In fact, Dar's recent ideas are inspiring me to think up some games to
use as training exercises.

What works for me in this type of circumstance is to create the simplest,
most basic object/script engine possible. I can usually take it from there.

Thanks again,
Ken N.




More information about the use-livecode mailing list