How do mouse evenets work?

I have a main window view that is an instance of the AS class (the script is of the class NSView). I also have several small NSImageView objects in this view that respond to mouseDown, mouseDragged and mouseUp events. If I put an NSMatrix into this main view as well, it does not respond to mouse events, and if I drag one of my image views over it and let go, then I can’t drag that view again --I get no mouse events at all (I’m logging them) when I click over this image view.

My understand of how mouse events work is that they are sent first to the object over which you clicked. Since my image views aren’t subclassed, and the image view class doesn’t respond to mouse events, the message is passed up the chain to the next responder. When the program starts, the image view is on the main window view, so the message gets sent there next and gets handled by my script. When I drag it over the matrix, does that become the next responder? And, is it getting stuck there and not being passed up to the main view? If so, is there a way to tell the matrix to pass it on? (I’ve tried selecting refuses first responder in IB, that doesn’t help)

Controls have a default mouseDown: method; if they didn’t, they wouldn’t do anything. Once you start overlapping controls, you’re in murky territory – I’m pretty sure it’s only recently been supported at all.

Forget about the overlapping part – why doesn’t it do anything when I click on the matrix (it’s a matrix of image views)? Shouldn’t it highlight or select or something?

Have a look at acceptsFirstMouse: and NSMatrixMode.