mouseUp question

Terry Judd terry.judd at unimelb.edu.au
Thu Aug 7 00:28:20 EDT 2014


Hi Larry, one approach is to do something like the code below, which
delays the mouseUp handler from running until after the doubleClick
interval has expired. You can adjust the double-click interval to be
whatever you like (shorter times will cause less obvious delays in the
mouseUp handler running).

on mouseUp
    send "doStuff" to me in (the doubleClickInterval)+1 millisecs
end mouseUp

on doStuff
    put "mouseUp"&cr after fld 1
end doStuff

on mouseDoubleUp
    repeat for each line tMessage in the pendingMessages
        if tMessage contains "doStuff" then cancel (item 1 of tMessage)
    end repeat
    put "mouseDoubleUp" &cr after fld 1
end mouseDoubleUp

Terry...



On 7/08/2014 2:11 pm, "larry at significantplanet.org"
<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