Re: Mouse Event Handling
Re: Mouse Event Handling
- Subject: Re: Mouse Event Handling
- From: "mw" <email@hidden>
- Date: Thu, 17 Oct 2002 08:00:43 -0400 (EDT)
Just use NSEvent's clickCount method to find out how many mouse clicks
were involved in the event. If it is a double-click, then your first
event will have a click count of 1 and you won't handle it, but then
it will be sent again with a click count of 2 (or 3), and that's when
you handle it. Just use an If statement.
mw
>
Howdy, and as always, thanks in advance!
>
I have subclassed an NSTextView and I am trying to differentiate
>
between single, double and triple clicks. My problem is that I am
>
getting single click events as part of the double click (and doubles
>
for the triple click).
>
>
In other words, when I double click the first event I get is a single
>
click and then the double click event.
>
>
I need to somehow "know" not to act on the single click since it is
>
the
>
first part of a double click.
>
>
Any ideas?
>
>
Tom Gray
_______________________________________________
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.