More send in time
Scott Rossi
scott at tactilemedia.com
Tue Jul 1 12:53:00 EDT 2003
Recently, "Ken Norris" wrote:
> If this:
>
>>> if the mouse is up then exit endlessScroller
>
> ...polls the mouse state, then why doesn't this:
>
>> set the uAllowScroll of me to true
>
> ...poll the state of "uAllowScroll of me" in the same way?
The first example polls the physical hardware state of the mouse. In
essence, the engine is repeatedly looking at the mouse to determine its
state. The second example evaluates the value of a variable, which is much
more efficient (and reliable) than looking at the hardware. There is little
to no overhead required to repeatedly check the value of a variable.
> These are the mechanics I don't understand. What, exactly, is the
> difference? I ask because without that understanding I'm liable to do the
> same type of thing again in a different setting.
The engine is extremely fast and reliable when it comes to checking the
value of a variable. Given the fact that the developers of the tools have
repeatedly stated this is the correct way to handle checking the mouse
state, it would be worth your time to get in the habit of using this
technique.
Regards,
Scott Rossi
Creative Director
Tactile Media, Multimedia & Design
-----
E: scott at tactilemedia.com
W: http://www.tactilemedia.com
More information about the use-livecode
mailing list