• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Is it possible to handle a mouse click in an NSTextView without subclassing it?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Is it possible to handle a mouse click in an NSTextView without subclassing it?
      • From: Douglas Davidson <email@hidden>
References: 
 >Is it possible to handle a mouse click in an NSTextView without subclassing it? (From: Damian Terentyev <email@hidden>)

  • Prev by Date: Re: SWF support on NSMovie
  • Next by Date: Re: Is it possible to handle a mouse click in an NSTextView without subclassing it?
  • Previous by thread: Re: (SOLVED) Is it possible to handle a mouse click in an NSTextView without subclassing it?
  • Next by thread: Re: Is it possible to handle a mouse click in an NSTextView without subclassing it?
  • Index(es):
    • Date
    • Thread