• 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: override behaviour of handling NSLinkAttributeName
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: override behaviour of handling NSLinkAttributeName


  • Subject: Re: override behaviour of handling NSLinkAttributeName
  • From: PCWiz <email@hidden>
  • Date: Mon, 2 Nov 2009 21:34:14 -0700

Oops, my mistake. That delegate method seems to work fine on NSTextField as well

many thanks
On 2009-11-02, at 9:05 PM, Jens Alfke wrote:


On Nov 2, 2009, at 8:01 PM, PCWiz wrote:

By default the clicked URL just opens in the default web browser. Is there any way to override this behaviour and have my own code run in place of just opening the URL.

There's an NSTextView delegate method for this:

- (BOOL)textView:(NSTextView *)textView clickedOnLink:(id)link atIndex:(NSUInteger)charIndex;

—Jens

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >override behaviour of handling NSLinkAttributeName (From: PCWiz <email@hidden>)
 >Re: override behaviour of handling NSLinkAttributeName (From: Jens Alfke <email@hidden>)

  • Prev by Date: [moderator] Re: why use pow(x, 2)?
  • Next by Date: Re: override behaviour of handling NSLinkAttributeName
  • Previous by thread: Re: override behaviour of handling NSLinkAttributeName
  • Next by thread: Re: PolKit for Leopard and later
  • Index(es):
    • Date
    • Thread