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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to