Re: detecting a double click ahead of time
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.