1. create a subclass of "NSView" and add the NSResponder "-(void)
mouseDown:(NSEvent*)theEvent"
2. open mainMenu.nib and drag a "NSView" into a NSWindow
3. go to the inspector tab "custom Class" and select your "MYQCView"
instead of "NSView"
4. compile and go... should work!
if you have problems, you can mail me off-list; I can mail you a
sample-project I just tried...
Best regards,
Michael
Am 12.02.2006 um 11:46 schrieb william van braam:
Beginners question.
I would like to catch the mouseDowns programatically, not in the
composition. So in IB I drop a (subclassed QCView) MyQCView on a
window and add its corresponding QCController. For MyQCView the
checkbox "Forward all events" is unchecked. Run it and click on the
MyQCView. The - (void)mouseDown(NSEvent *)e {NSLog@"...";} in
MyQCView.m doesn't react.
So, where to catch the mouseDowns?
I must be missing something very basic; a pointer would be
appreciated.
(QC2.1.1, XCode2.1.1, iBookG4, Tiger)