I have difficulties to understand what happens when one overrides mouse events in an NSView.
In the following sample both methods are called by the Cocoa framework:
- (void)mouseDown:(NSEvent *)theEvent {
NSLog(@"mouseDown");
}
- (void)mouseDragged:(NSEvent *)theEvent {
NSLog(@"mouseDragged");
}
When I add [super mouseDown:theEvent] to the mouseDown: method the mouseDragged: method is not called by the Cocoa framework anymore:
- (void)mouseDown:(NSEvent *)theEvent {
NSLog(@"mouseDown");
[super mouseDown:theEvent];
}
- (void)mouseDragged:(NSEvent *)theEvent {
NSLog(@"mouseDragged");
}
Why is this? How can I call the standard mouseDown behavior of the Cocoa framework so that mouseDragged: gets called?