Can I reset NSEvent's clickCount threshold?
Can I reset NSEvent's clickCount threshold?
- Subject: Can I reset NSEvent's clickCount threshold?
- From: Daniel Jalkut <email@hidden>
- Date: Sat, 9 Oct 2004 13:26:03 -0700
I am running into a problem with NSEvents being generated with
uselessly high "clickCount" values. After clickCount=2, NSMatrix seems
to ignore all mouse clicks.
I'm using NSMatrix as the basis for a custom file-system navigator, and
one of the things I use is NSMatrix's doubleAction to open "directory"
type icons in my view. A situation occurs when the user double-clicks
a folder icon to reveal another folder icon immediately below at the
same mouse location. If the user then double clicks that icon quickly
enough, the mouse events come through as clickCount=3 and clickCount=4.
These are ignored by NSMatrix so I never get called.
Ideally, I'd like to be able to tell the event system that it's time to
"reset clickCount." I can't find anything like this so I'm thinking of
a workaround in which I'll intercept all mouseDowns to the NSMatrix
and, if the clickCount is greater than 2, I'll create a new mouse event
with all the same details except that clickCount will be actual count
mod 2. This should have the effect of translating quick follow-up
clicks into the desired behavior, only because NSMatrix doesn't do
anything special with 3+ clicks.
Is there a cleaner way to get the behavior I'm seeking?
Daniel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden