On Oct 3, 2011, at 10:20 PM, Sandeep Mohan Bhandarkar wrote:

> Hi All,
> 
> 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.
> 
> Thanks and Regards,
> Sandeep.

Instead of URLWithString:, have a look at fileURLWithPath: to construct an 
NSURL from a file path.

Charles_______________________________________________

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