• 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: Murat Konar <email@hidden>
  • Date: Thu, 19 Apr 2007 14:29:01 -0700


On Apr 19, 2007, at 1:52 PM, I. Savant wrote:

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."

How does this negate my description of a doubleClick? The bit you quote is a statement about what does not qualify as a multi-click, not what does. It asserts that a mouseUp that occurs "a long time" after the preceeding mouseDown considered distinct for the purposes click counting, that's all.



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.

I don't know which email client you are using, but in Apple's Mail (a Cocoa app) a click-release (down, up) followed within the double click time interval by a click-hold (down) DOES select the word as soon as I click down.


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! :-)

The delta between the first and second clicks is very relevant. A click at 100, 100 followed by a click at 200, 200 will not be considered a doubleClick no matter how close in time they occur.


_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


  • Follow-Ups:
    • Re: doubleClick slop?
      • From: "I. Savant" <email@hidden>
    • Re: doubleClick slop?
      • From: Michael Watson <email@hidden>
References: 
 >doubleClick slop? (From: Murat Konar <email@hidden>)
 >Re: doubleClick slop? (From: "I. Savant" <email@hidden>)

  • Prev by Date: Re: doubleClick slop?
  • Next by Date: Re: doubleClick slop?
  • Previous by thread: Re: doubleClick slop?
  • Next by thread: Re: doubleClick slop?
  • Index(es):
    • Date
    • Thread