Re: how to set path on NSPathControl
Re: how to set path on NSPathControl
- Subject: Re: how to set path on NSPathControl
- From: Sandeep Mohan Bhandarkar <email@hidden>
- Date: Mon, 3 Oct 2011 20:44:08 -0700
Tried doing the same with the value bindings and it seemed to work.
On Oct 3, 2011, at 8:41 PM, Quincey Morris wrote:
> 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:.
>
>
Sandeep Mohan Bhandarkar
408-859-6610
email@hidden
_______________________________________________
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