• 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: detecting a double click ahead of time
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: detecting a double click ahead of time


  • Subject: Re: detecting a double click ahead of time
  • From: "Alastair J.Houghton" <email@hidden>
  • Date: Tue, 21 Oct 2003 23:06:32 +0100

On Tuesday, October 21, 2003, at 10:24 pm, Robert Miller wrote:

I know. but, the problem is when clickCount == 1, I want to look ahead to see if it will actually be == 2 BEFORE it actually is. By the time it is == 2 it's too late.

The standard method is to run start a timer when you see the first click, then if you don't get a double-click before the timer fires, assume that there isn't going to be one. Obviously you need to remember to cancel the timer if you see a double click, and you will also want to ignore double-clicks if they don't happen when you're running the timer (otherwise a spurious double-click event could cause a lot of trouble).

Whilst we're on this topic, does anyone know how to read the double-click speed (the one from Preferences) from Cocoa? I've seen the Carbon GetDblTime() function, which will obviously work, but it'd be nice to know if there's an equivalent in Cocoa (e.g. is it in the defaults database?).

Kind regards,

Alastair.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: detecting a double click ahead of time
      • From: Ambroise Confetti <email@hidden>
References: 
 >Re: detecting a double click ahead of time (From: Robert Miller <email@hidden>)

  • Prev by Date: Re: detecting a double click ahead of time
  • Next by Date: Aqua-style custom views
  • Previous by thread: Re: detecting a double click ahead of time
  • Next by thread: Re: detecting a double click ahead of time
  • Index(es):
    • Date
    • Thread