Call [super mouseDown:theEvent];
NSTextView : how to subclass, override -mouseDown and still be able to select text?
-
04-10-2022 - |
Question
I subclassed NSTextView
. The .m
is very simple and short :
@implementation MyTextView
- (void)mouseDown:(NSEvent *)theEvent
{
NSLog(@"click") ;
}
@end
But now, I cannot select text anymore in MyTextView. How can I fix that?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow