Re: Detect URL in NSTextView
Re: Detect URL in NSTextView
- Subject: Re: Detect URL in NSTextView
- From: John Stiles <email@hidden>
- Date: Thu, 10 Mar 2005 06:49:44 -0800
Make sure to remove this part:
// Look for elite words
theRange = [string rangeOfString:@"blackhole"];
if( theRange.location == 0 && theRange.length == [string length] )
return [NSURL URLWithString:@"http://www.blackholemedia.com/"];
That kind of bugs me. Someone makes an awesome freeware thing that everyone can use, but then they drop in little stuff like this that every other developer has to look for and manually fish out. A little too sneaky for me.
(PS I may end up using it as well. Apple should add an NSTextView flag in Tiger to have similar behavior.)
On Mar 9, 2005, at 11:16 PM, Adam wrote:
The answer!
http://www.blackholemedia.com/code/
On Mar 8, 2005, at 10:37 PM, Adam wrote:
I have an NSTextView that is the output of a chat session. If a user posts a line that contains a url (http://www.google.com), I would like to make it blue, underlined and clickable. Is there any simple way to do this?
Thanks,
Adam
_______________________________________________
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
_______________________________________________
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
_______________________________________________
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