• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: doubleClick slop?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: doubleClick slop?


  • Subject: Re: doubleClick slop?
  • From: "I. Savant" <email@hidden>
  • Date: Thu, 19 Apr 2007 16:52:23 -0400

On 4/19/07, Murat Konar <email@hidden> 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".

 Well, not really. From NSEvent's -clickCount documentation:

"Returns 0 for a mouse-up event if a time threshold has passed since
the corresponding mouse-down event. This is because if this time
threshold passes before the mouse button is released, it is no longer
considered a mouse click, but a mouse-down event followed by a
mouse-up event."

I know how to get the double click interval. How do I get Cocoa's
opinion of how close is "close enough" (i.e. how close geometrically
must the locations of the mouseUp  and mouseDown events be for the
mouseDown event to have a clickCount > 1)?

I don't know of a way to determine this myself, but given the quote above, I don't think you're meant to. What you describe is more of a click and a half. If I do the same thing with my pointer over a word in this e-mail editor, for example, (click, let go, click and hold as a double-click with the last click held), the word I'm clicking on doesn't get highlighted, even when I let the last click go after a delay.

 With this in mind, the slop is irrelevant because the clickCount is
all you really need to know if it's a double-click (since the system
is determining this for you).

 Now I may be grossly wrong, but that's the way I understand it. I
welcome any and all enlightenment! :-)

--
I.S.
_______________________________________________

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


  • Follow-Ups:
    • Re: doubleClick slop?
      • From: Murat Konar <email@hidden>
References: 
 >doubleClick slop? (From: Murat Konar <email@hidden>)

  • Prev by Date: Re: CG related warnings when loading Nib
  • Next by Date: Re: doubleClick slop?
  • Previous by thread: doubleClick slop?
  • Next by thread: Re: doubleClick slop?
  • Index(es):
    • Date
    • Thread