• 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
-[NSURL path] returning empty string for relative file URL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-[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


  • Follow-Ups:
    • Re: -[NSURL path] returning empty string for relative file URL
      • From: Rob Mayoff <email@hidden>
  • Prev by Date: Special characters
  • Next by Date: Re: CoreData, inheritance and plug-ins
  • Previous by thread: Re: Special characters
  • Next by thread: Re: -[NSURL path] returning empty string for relative file URL
  • Index(es):
    • Date
    • Thread