the pendingClick

J. Landman Gay jacque at hyperactivesw.com
Tue Aug 10 23:28:53 EDT 2010


On 8/10/10 5:40 PM, Mark Wieder wrote:
> zryip-
>
> Tuesday, August 10, 2010, 3:36:24 PM, you wrote:
>
>> Have a look to this old thread:
>
>> http://www.mail-archive.com/use-revolution@lists.runrev.com/msg110620.html
>
> Ah... Eric to the rescue once again...
>

Ken Ray had a good one too, a long time ago. I don't think he'll mind if 
I quote it:

<snip stuff>

... my version uses the pendingMessages to cancel the "doClick"
> command if the user actually double-clicks:
>
> on mouseUp
>   send "doClick" to me in (the doubleClickInterval) milliseconds
> end mouseUp
>
> on mouseDoubleUp
>   put lineOffset(",doClick,",the pendingMessages) into tLine
>   if tLine <> 0 then cancel item 1 of line tLine of the pendingMessages
>   --> doDoubleClickStuff
> end mouseDoubleUp
>
> on doClick
>   --> doSingleClickStuff
> end doClick
>
> It's a bit shorter, but depends on the pendingMessages, so if you think some
> external force may muck with the pendingMessages during the
> doubleClickInterval you may wish to go another route. But it's worked for me
> for years...
>
> Ken Ray
> Sons of Thunder Software
> Web site: http://www.sonsothunder.com/
> Email: kray at sonsothunder.com
>
>
> _______________________________________________


-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list