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 protected]



_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to