• 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: Funky file URLs from drag & drop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Funky file URLs from drag & drop


  • Subject: Re: Funky file URLs from drag & drop
  • From: Quincey Morris <email@hidden>
  • Date: Fri, 11 May 2012 17:10:58 -0700

On May 11, 2012, at 16:58 , Rick Mann wrote:

> 					NSString* path = [item stringForType: @"public.file-url"];
> 					NSURL* url = [NSURL fileURLWithPath: path];

You absolutely can't do this. A URL is not a path, not even when accessed as a string.

(The first method is returning 'file:/localhost/Users/rmann/Desktop/SpaceX_CCDEV2.jpg', which is treated as a relative path name by the second, and so being prefixed with the absolute path to the current directory.)


_______________________________________________

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

  • Follow-Ups:
    • Re: Funky file URLs from drag & drop
      • From: Rick Mann <email@hidden>
References: 
 >Funky file URLs from drag & drop (From: Rick Mann <email@hidden>)

  • Prev by Date: Funky file URLs from drag & drop
  • Next by Date: Re: Funky file URLs from drag & drop
  • Previous by thread: Funky file URLs from drag & drop
  • Next by thread: Re: Funky file URLs from drag & drop
  • Index(es):
    • Date
    • Thread