Colas
Colas

Reputation: 3573

NSTextView : how to subclass, override -mouseDown and still be able to select text?

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?

Upvotes: 0

Views: 535

Answers (1)

Volker
Volker

Reputation: 4658

Call [super mouseDown:theEvent];

Upvotes: 1

Related Questions