mouseUp question

Paul Hibbert paulhibbert at mac.com
Thu Aug 7 00:30:00 EDT 2014


Larry,

One way to do this is to pass the result of each mouse handler to a command e.g.:

local sMouseClicks

on mouseUp
   put 1 into sMouseClicks
   mouseAction
end mouseUp

on mouseDoubleUp
   put 2 into sMouseClicks
   mouseAction
end mouseDoubleUp

command mouseAction
   if sMouseClicks = 2 then
      put "Mouse Double Up"
   else
      put "Mouse Up"
   end if
end mouseAction

There may be better ways but this works well enough for me.

Paul


On 2014-08-06, at 9:11 PM, larry at significantplanet.org wrote:

> In a field I have two scripts - one for mouseUp and another one for mouseDoubleUp
> 
> When the user clicks a line in the field (mouseUp) it plays the .wav file they click on
> 
> When the user double clicks it copies the .wav file to another field.
> 
> The problem is that LC runs BOTH scripts when the user dbl clicks.
> There is the small delay of time after the first click and before the second click.
> 
> How do I get LC to ignore mouseUp when the user dbl clicks??
> 
> TIA
> Larry
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list