Responding to mouse click to an NSImageView...

I'm trying to respond to the user clicking in different parts of an image: NSImageView only sends the action message to my target when I drag and drop an image in to it…
NSImageView and override
- (void)mouseDown:(NSEvent *)theEvent
in your subclass. You can then test where the user clicks in you image using the parameters in the
NSEvent parameter and do what you want from there.
NSPoint where = [self convertPoint:[theEvent locationInWindow] fromView:nil] ;

Note that if the NSImageView is bordered by a frame style other than NSImageFrameNone, this frame is drawn inside the NSImageView's frame and this affect the coordinates of the point inside the "real" image. Of course scaling and alignement also affect the relationship between where the user's clicks and the real coordinatee in the image drawn by the view.
For these reason, it is better to create you own subclass of NSView and keep these parameters under direct control of your code if you really need to know where the user clicked in the image displayed in the view and not only where he clicked in the view used to display the image.

NB
To call the original action of the NSImageView do: [NSApp sendAction:[self action] to:[self target] from:self];

 
You have to subclass