I need to create a quick demo app (asap). It has a NSImageView (with a full window sized photo) and the mouse point clicks, drags and moves over this.
There is also an NSTextField (Label) to show the mouse event and position over the window.
I've created a project using the Cocoa app template, and create a new ViewController, added that view controllers view to the windows contextView, and the NSImageView shows up fine - as does the label.
However events such as
- ( void ) mouseDown:( NSEvent * )event;
- ( void ) mouseMoved:( NSEvent * )event;
Don't do anything. If I have an NSLog in there, they never get hit.
I have set:
- ( BOOL ) becomesFirstResponder
{
return YES;
}
but that also doesn't make any difference.
Can someone please point out what I'm doing wrong? I'm an iOS Dev of 2+ years and this is my first Mac OS X app. I have to get this working in the next 24hours :(