Avoiding mouse polls

Curry curry at pair.com
Mon Dec 16 04:37:01 EST 2002


>Thanks Curry,
>
>I think this is sort of on the right track. I think you expect the code to
>be in a loop, right? So it detects a mouse message while it's running via
>the send command, right? No, that won't quite work either.

No, not in a loop! The send command I used *is* the equivalent to the 
loop--it schedules the next change in which object is hilited. For 
detecting the mouse action, no loop is needed as others have pointed 
out.

In the card or stack script. I included two handlers, one "dohilite" 
which would cycle the hilited object and one "mousedown" to select 
the currently hilited object. I was in a hurry so just put "end" 
instead of "end dohilite". Of course, you have to send one "dohilite" 
sometime to start it off, either when opening the card or through 
some other method.

Curry




More information about the use-livecode mailing list