Problems with hitTest and mouseDown in my subview.
Problems with hitTest and mouseDown in my subview.
- Subject: Problems with hitTest and mouseDown in my subview.
- From: "Carter R. Harrison" <email@hidden>
- Date: Sat, 14 Oct 2006 09:56:00 -0400
I'm kind of just starting with Cocoa so please excuse me if this is a
complete newb question.
I've got a subview that we'll call superview. It's got some other
custom subview that we'll call subviews. I want to detect mouse
clicks on my superview - I don't want the clicks to be passed down
the responder chain to the subviews. So I implemented hitTest in my
superview and it returns itself to keep the click from being passed
down to the subview. So then in my mouseDown method within the
superview I handle the click. But the problem is that the point I
receive from the mouseDown's NSEvent is always (0, 0). So I figured
that maybe I need to convert the point to the superview's local
coordinate system using:
NSPoint event_location = [theEvent locationInWindow];
NSPoint local_point = [self convertPoint:event_location fromView:nil];
And of course this still returns (0, 0) as the point in superview's
local coordinate system. What's going on here and why would I be
receiving (0, 0)? Thanks in advance.
Regards,
Carter
_______________________________________________
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