Re: how to set path on NSPathControl
Re: how to set path on NSPathControl
- Subject: Re: how to set path on NSPathControl
- From: Quincey Morris <email@hidden>
- Date: Mon, 03 Oct 2011 20:41:39 -0700
On Oct 3, 2011, at 20:20 , Sandeep Mohan Bhandarkar wrote:
> Can some one let me know if it is possible to set a NSPathControl using a NSString. I tried the follwong.
>
> NSString *Node1 = @"Test1";
> NSString *Node2 = @"Test2";
>
> [rootSubRootPath setURL:[NSURL URLWithString:[NSString stringWithFormat:@"/%@/%@", Node1, Node2]]];
>
> Here rootSubRootPath is a object of type of NSPathControl. Can some one please let me know if it is possible to set a path using a NSString.
According to the NSURL class reference:
> URLWithString:
>
> Creates and returns an NSURL object initialized with a provided string.
>
> + (id)URLWithString:(NSString *)URLString
>
> Parameters
> URLString
>
> The string with which to initialize the NSURL object. Must be a URL that conforms to RFC 2396. This method parses URLString according to RFCs 1738 and 1808. (To create NSURL objects for file system paths, use fileURLWithPath:isDirectory: instead.)
Use fileURLWithPath:isDirectory: instead. Or possibly fileURLWithPathComponents:.
_______________________________________________
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