• 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: Detect URL in NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Detect URL in NSTextView (From: Adam <email@hidden>)
 >Re: Detect URL in NSTextView (From: Adam <email@hidden>)

  • Prev by Date: Re: Cocoa from C++ (dont want to mix it)
  • Next by Date: Is NSWindow's setContentResizeIncrements: buggy resizing over the dock?
  • Previous by thread: Re: Detect URL in NSTextView
  • Next by thread: What NS Class is used to make movable menu bars?
  • Index(es):
    • Date
    • Thread