• 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: baseURL problem with +fileURLWithPath:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: baseURL problem with +fileURLWithPath:


  • Subject: Re: baseURL problem with +fileURLWithPath:
  • From: Volker in Lists <email@hidden>
  • Date: Tue, 18 May 2010 14:03:19 +0200

Robert,

when/where do you call [url path]? It may be released at that moment and thus display garbage! What happens if you omit the call to autorelease when creating url ?

Volker

Am 18.05.2010 um 13:52 schrieb Robert Monaghan:

> Hi Mike,
>
> This is pretty trivial.. I have a string that is coming from an FCP XML file. The string looks like this:
> file:/localhost/Users/bob/Movies/ARRI/ELAP/shot_1_2/Imagery/Proxies/DMAG001_1_2_TAKE_005_RAWPROXY720P.mov
>
> I then pass the string to an NSURL object using: (Yes, I know I can do a "fileURLWithPath:" -- I am trying to troubleshoot where the problem is.)
> NSURL *url = [[[NSURL alloc] initFileURLWithPath:[[pathurlArray objectAtIndex:0] stringValue]] autorelease];
>
> Then, I try to get an NSString object by doing:
> [url path]
>
> This is where things go wildly wrong.. the NSString value ends up being a path to my binary.
>
>

_______________________________________________

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: baseURL problem with +fileURLWithPath:
      • From: Robert Monaghan <email@hidden>
References: 
 >baseURL problem with +fileURLWithPath: (From: Robert Monaghan <email@hidden>)
 >Re: baseURL problem with +fileURLWithPath: (From: Mike Abdullah <email@hidden>)
 >Re: baseURL problem with +fileURLWithPath: (From: Robert Monaghan <email@hidden>)

  • Prev by Date: Re: baseURL problem with +fileURLWithPath:
  • Next by Date: Re: baseURL problem with +fileURLWithPath:
  • Previous by thread: Re: baseURL problem with +fileURLWithPath:
  • Next by thread: Re: baseURL problem with +fileURLWithPath:
  • Index(es):
    • Date
    • Thread