Re: Is it possible to handle a mouse click in an NSTextView without subclassing it?
Re: Is it possible to handle a mouse click in an NSTextView without subclassing it?
- Subject: Re: Is it possible to handle a mouse click in an NSTextView without subclassing it?
- From: Ricky Sharp <email@hidden>
- Date: Fri, 20 Oct 2006 11:12:24 -0500
On Friday, October 20, 2006, at 09:39AM, Damian Terentyev <email@hidden> wrote:
>I need to handle a mouse click in an NSTextView, so that action is
>taken when a user clicks on any particular character in it.
>I've read that it is done by creating a custom TextView.
>Are there any simpler variants available?
Depending upon what you're actually putting in the text view (e.g. are the clickable characters part of links?), you could use delegate methods like textView:clickedOnLink:atIndex:
You could even use text attachments too.
If it's the case where your text view will just contain raw text and you need to handle mouse-down in general, then I think you'll need to subclass.
--
Rick Sharp
Instant Interactive(tm)
_______________________________________________
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