-[NSURL path] returning empty string for relative file URL
-[NSURL path] returning empty string for relative file URL
- Subject: -[NSURL path] returning empty string for relative file URL
- From: Glen Simmons <email@hidden>
- Date: Thu, 10 Nov 2005 17:46:38 -0600
I'm having an issue with NSURL. It returns an empty string when -path
is called, even though -absoluteString returns "file://foo.bar". Is
it because it's a relative file URL? I would expect -path to return
"foo.bar".
Background: I'm getting this NSURL in
textView:clickedOnLink:atIndex:. The link that was clicked started
life as an anchor in some XHTML. I'm using -[NSAttributedString
initWithData:options:documentAttributes:error:] to display it in the
NSTextView. I'm adding the "file://" to the anchor myself before
creating the NSAttributedString. Otherwise, I get an NSURL that looks
like this: applewebdata://108AB768-64CD-41CF-94FA-C4558EBA0B1E/
foo.bar. (What's up with that, anyway?)
Thanks,
Glen Simmons
_______________________________________________
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