NSTextView and automaticLinkDetection
NSTextView and automaticLinkDetection
- Subject: NSTextView and automaticLinkDetection
- From: Steve Cronin <email@hidden>
- Date: Tue, 20 Jan 2009 00:58:17 -0600
Folks;
NSTextView has an attribute 'automaticLinkDetection' that can be set
in IB or with the usual -set method.
What the docs say is that it "...causes strings representing URLs
typed in the view to be automatically made into links to those URLs..."
This is what I observe. If I begin typing in the textView it will
render a url into a clickable link. This is good!
But what I am looking for is the ability to set a textView's
stringValue (an NSString) and have any links in the text be reflected
as links (as if I had typed them in)
So the distinction is that there are no keyboard events to drive this
evaluation.
I notice that TextEdit does not do this if, for example, you paste a
plain text snippet which contains a url into a Rich Text document.
The links are not rendered clickable unless you generate a keyboard
event which causes the url to get evaluated as such...
So is what I am evisioning possible? I would not know ahead of time
whether or not the text would contain any, one or many url...
Thanks for any shared knowledge here!
Steve
_______________________________________________
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