timing mouseDown
dunbarx at aol.com
dunbarx at aol.com
Thu Feb 21 22:49:15 EST 2013
This worked in 1987, no reason to get all fancy with sending in time and so forth, and it is a case where the wait command is perfectly at home:
on mouseDown
put the ticks into tStart
wait until the mouse is up
if the ticks - tStart < 20 then answer "Short Press"
else answer "Long Press"
end mouseDown
Craig Newman
-----Original Message-----
From: Gerry Orkin <gerry.orkin at gmail.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Thu, Feb 21, 2013 8:20 pm
Subject: Re: timing mouseDown
Use mousestilldown?
Gerry
On 22/02/2013, at 10:37 AM, Nicolas Cueto <niconiko at gmail.com> wrote:
> Hello.
>
> On mobile apps, pressing a button-icon can have two results, depending on
> how long the button is held down.
>
> I recollect having scripted this effect on LC in the past, using mouseDown
> and "send" and "cancel message". But I also recollect problems with the
> message queue.
>
> So, what would an ideal LC script be for this, with both desktop and mobile
> platforms in mind?
>
> Thank you.
>
> --
> Nicolas Cueto
> _______________________________________________
> 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
_______________________________________________
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