Question

I have 2 subclasses of NSView that are subviews to a common superview. They dont overlap and they both intercept mousedragged calls. When I drag from one of the subclasses to the other the mousedragged function will be called until I release the mouse button even when I drag all over the screen. I though the default behavior was for the mousedragged function to be called only when the mouse was over the bounds of the receiver. Iam also using NSTrackingArea for mouse enter, exit and move events, but from what I've been reading does not involve drag events

Thank you for your time, Jose.

Was it helpful?

Solution

You could subclass the NSWindow and override sendEvent:. That way, you can intercept the NSLeftMouseDragged events and dispatch them in whatever way you wish.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top