• 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: David Remahl <email@hidden>
  • Date: Wed, 22 Oct 2003 00:00:30 +0200

On 21 okt 2003, at 23.24, 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.

Hmm, you do realize -- don't you, that in non-exceptional cases the second click won't even have _happened_ when the first mouseDown: message is sent? Cocoa is a competent framework, but it doesn't detect future clicks.

If you want an action to happen only for single clicks, then you should probably schedule a timer to trigger in doubleClickInterval + some. If you receive a second mouseDown:, and find that clickCount != 1, you invalidate the timer. Otherwise, you perform whatever you want to in the timer action.

Perhaps I'm missing something...

/ David
_______________________________________________
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.

References: 
 >Re: detecting a double click ahead of time (From: Robert Miller <email@hidden>)

  • Prev by Date: Re: Text Smoothing on Panther
  • Next by Date: Re: detecting a double click ahead of time
  • 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