Re: baseURL problem with +fileURLWithPath:
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