Re: doubleClick slop?
Re: doubleClick slop?
- Subject: Re: doubleClick slop?
- From: Murat Konar <email@hidden>
- Date: Thu, 19 Apr 2007 15:32:38 -0700
On Apr 19, 2007, at 2:36 PM, Michael Watson wrote:
On 19 Apr, 2007, at 17:29, Murat Konar wrote:
The definition of a double click is a mouseUp event followed by a
mouseDown that occurs within a window of time (the double click
interval), and whose locations are "close enough".
The behaviour of a double-click, to the user, is dependent on the
context.
In the days before the Mac OS provided click counts, developers had
to do it themselves. Apple's guidance as to what should constitute a
double click was as follows: (from the old Inside Mac Event Manager
docs):
"You should interpret mouse events as a double click if both of these
conditions are true:
- The times of the mouse-up event and mouse-down event differ by a
number of ticks less than or equal to the value returned by the
GetDblTime function.
- The locations of the two mouse-down events separated by the mouse-
up event are sufficiently close to each other. How you determine this
value depends on your application and the context in which the mouse-
down events occurred."
Nowadays, click counts are provided by the OS. Playing around with
Cocoa a bit confirms that Cocoa (and presumably Carbon as well) still
adhere to the classical definition of "double click".
Developers can choose to ignore the OS's definition of "double click"
for specialized behavior, but the OS does provide click counts for
events and uses time intervals and location differences to determine
click count. I know how to get the double click time interval. I am
looking for a way to get the double click location threshold.
_murat
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden