2nd click of a dbl click goes to wrong view?!
2nd click of a dbl click goes to wrong view?!
- Subject: 2nd click of a dbl click goes to wrong view?!
- From: m <email@hidden>
- Date: Mon, 29 Mar 2004 03:25:00 -0800
Say I have a view in whose mouseDown method I move a subview such that
it centered at the location of the mouseDown event. Both the view and
the subview implement mouseDragged. So a typical use scenario is this:
a) 1st mouse down: view's mouseDown method called -> subview moved into
position
b) 2nd mouse down: subview's mouseDown method called
c) mouse dragged: subview's mouseDragged method called
If the two mouse downs are far enough apart time wise, everything is
fine. However, if the user double-clicks, the 2nd mouse down is routed
not to the subview (which we moved into position when we handled the
first mouse down), but to the view that contains it. Worse, when the
user drags the mouse after the 2nd mouse down, it is the containing
view's mouseDragged method that is called, not the subview's
mouseDragged method.
My guess is that the AppKit is not bothering to hit test the 2nd mouse
down event if the double-click time interval has not passed. This seems
an oversight and I will probably report it as a bug.
In the meantime, I need a way to selectively prevent the AppKit from
interpreting 2 mouseDowns at the same coordinate, but in different
views, as a double click, perhaps by temporarily setting the
double-click interval to zero. But I don't know how.
Any ideas?
_murat
_______________________________________________
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.