override behaviour of handling NSLinkAttributeName
override behaviour of handling NSLinkAttributeName
- Subject: override behaviour of handling NSLinkAttributeName
- From: PCWiz <email@hidden>
- Date: Mon, 2 Nov 2009 21:01:37 -0700
I'm making text clinks in an NSMutableString clickable through adding
the NSLinkAttributeName attribute to any text that is a URL inside the
string.
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.
The only workaround I see for this is creating a custom URL handler
for my app, e.g. myapp:// and then add the NSLinkAttributeName
attribute to it, and then when it opens the link my app will be called
to handle it. But it would be nice if there was an easier way to do
this.
Any suggestions are appreciated
thanks
_______________________________________________
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