mouseup/mouseDoubleU

Peter Haworth pete at mollysrevenge.com
Tue Feb 1 15:17:54 EST 2011


Interesting.  The problem I have is that the mouseDoubleup never triggers even if I'm within the doubleclick... parameters.  And even if it did, it doesn't really help because I still have to write some code in the mouseUp handler to make sure the user didn't double click so the mouseDoubleup message is kind of pointless since I've already dealt with it in mouseUp.

It's just an anomaly I guess but sure would be nice if the dictionary said something somewhere about this issue.

I have to admit I'm a bit puzzled by the references to double clicks not being part of HIG.  I'm sitting here looking at the finder window on my Mac and if I want to open a file or run an application, I have to double click on it.  I'm sure there are other examples.

Pete Haworth

On Feb 1, 2011, at 11:47 AM, Jim Lambert wrote:

> On Feb 1, 2011, at 10:00 AM, Craig wrote:
> 
>> If you have this in a button script:
>> 
>> on mouseUp
>>   put "single"
>>   wait 15
>>   put "" --just to see it work
>> end mouseup
>> 
>> on mouseDoubleUp
>>   put "double"
>>   wait 15
>>   put "" --just to see it work
>> end mouseDoubleUp
>> 
>> you can get all sorts of behaviors if you click at various rates. Sometimes 
>> you even get what you want, that is, a single response to a double click. 
>> This takes practice and luck, though, and that seems contrary to clean, 
>> robust programming methodology.
>> 
>> Jim, can you elaborate on your idea of passing mouseup? How and where would 
>> you do that?
>> 
>> 
> 
> I was guessing that trapping a single mouseUp might affect the doubleUp. But it doesn't. So ignore that suggestion!
> 
> When I try this without any 'waits':
> 
> on mouseUp
>   put cr & "single" after msg
> end mouseup
> 
> on mouseDoubleUp
>      put cr & "double" after msg
> end mouseDoubleUp
> 
> 
> I get the expected output. The mouseUp is always triggered. The mouseDoubleUp only triggers if I meet the doubleclickinterval and doubleclickdelta as Peter noted.
> 
> Jim Lambert
> _______________________________________________
> 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