Distinguishing simple and double clicks

David Bovill david at vaudevillecourt.tv
Tue Sep 23 10:45:00 EDT 2008


I think it's common enough a GUI technique for a feature request - though
I'm not sure how? Maybe something like:

insert the mouseDoubleUp of btn 1 to front
>
or

set the messageOrder of btn 1 to "mouseDoubleUp,mouseDouble"

but it may be hard to implement in the engine?

2008/9/23 Eric Chatonet <eric.chatonet at sosmartsoftware.com>

> Thanks David: I was afraid of ;-)
>
> Le 23 sept. 08 à 15:49, David Bovill a écrit :
>
>
>  That's what I do. Logically there is no way out of delaying the mouseUp
>> until after the the mouseDoubleUp. I think you can improve it for machines
>> of different speeds and look at things like the doubleclickinterval - but
>> I
>> never really got it working / sound it to be needed except on very old
>> machines?
>>
>> 2008/9/23 Eric Chatonet <eric.chatonet at sosmartsoftware.com>
>>
>>  Bonjour à tous,
>>>
>>> I just want to make something that was easy with HC: e.g. allow the user
>>> to
>>> use simple and double clicks on the same button but with different
>>> actions.
>>> MouseUp is always sent by the engine first then mouseDoubleUp is sent if
>>> appropriate.
>>>
>>> So the question is how to not execute a mouseUp handler if it is just the
>>> first click of a double click?
>>> Here is a code that allows this but:
>>> . It sounds a bit complicated ;-)
>>> . It delays mouseUp action by 500 millseconds :-(
>>>
>>> Any better idea?
>>>
>>> local sDoubleClick
>>> ---------------------
>>> on mouseUp
>>>  send "DoMouseUp" to me in 500 milliseconds
>>> end mouseUp
>>> ---------------------
>>> on mouseDoubleUp
>>>  put true into sDoubleClick
>>>  DoMouseDoubleUp --
>>>  send "ResetScriptVar" to me in 500 milliseconds
>>> end mouseDoubleUp
>>> ---------------------
>>> on DoMouseUp
>>>  if sDoubleClick then exit DoMouseUp
>>>  put "Simple Click"
>>> end DoMouseUp
>>> ---------------------
>>> on DoMouseDoubleUp
>>>  put "Double Click"
>>> end DoMouseDoubleUp
>>> ---------------------
>>> on ResetScriptVar
>>>  put false into sDoubleClick
>>> end ResetScriptVar
>>>
>>
> Best regards from Paris,
> Eric Chatonet.
> ----------------------------------------------------------------
> Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
> Email: eric.chatonet at sosmartsoftware.com/
> ----------------------------------------------------------------
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list