Messages problem
Thierry Arbellot
thierry.arbellot at wanadoo.fr
Sat Jul 24 11:32:14 EDT 2004
The "something else" happens more than once when the click duration is
longer than 10 millisec
Try to put the "something else" in the mouseDown handler, it will be
processed only once per click
on mouseDown
(do something else as well) -- Places a marker at the mouseLoc.
end mouseDown
on checkMouse
(do some stuff) --Puts the mouseLoc into a field.
send "checkMouse" to me in 10 millisec
--This loop is halted with a "mouseDoubleDown" in the card script.
end checkMouse
Thierry
On Saturday, Jul 24, 2004, at 17:06 Europe/Paris, Jim Hurley wrote:
> I need help with flushing messages, at least I think it is a messages
> problem.
>
> In the handler below "checkMouse" repeatedly does "some stuff", and,
> if the mouse was clicked ("if the mouse is down"), it does "something
> else as well".
>
> The problem is that the something else often happens more than once, I
> assume because there is a "checkMouse" message hanging around.
>
> Is there a better way to prevent the repetition of the "something
> else" than waiting 5 ticks?
>
> on checkMouse
> (do some stuff) --Puts the mouseLoc into a field.
> if the mouse is down then
> (do something else as well) -- Places a marker at the mouseLoc.
> wait 5 ticks --I am using this line to keep ""something else" from
> happening more than once.
> end if
> send "checkMouse" to me in 10 millisec
> --This loop is halted with a "mouseDoubleDown" in the card script.
> end checkMouse
>
>
> Jim
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list