Respond to Click in TextView
Respond to Click in TextView
- Subject: Respond to Click in TextView
- From: Michael Terry <email@hidden>
- Date: Sat, 26 Aug 2006 22:33:49 -0700
Hello,
I'd like to respond to mouseDown events in a TextView, but just how
is eluding me. In case some configuration error in my application was
the culprit, I set up a fresh one.
In Interface Builder, I noticed that MyDocument is listed as the
delegate for the NSWindow instance. That being the case, this is what
I expected to happen when clicking on the running program's TextView:
click event sent to TextView, forwarded to ScrollView, forwarded to
NSWindow, and finally forwarded to the window's delegate MyDocument
where it had been prepared to receive it with:
- (void)mouseDown:(NSEvent *)event
{
NSLog(@"mouseDown: %d", [event clickCount]);
}
... in MyDocument.m. However, clicking in the TextView (or window)
doesn't register anything in the log. What don't I understand?
Michael Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden