Re: Odd NSString behavior
Re: Odd NSString behavior
- Subject: Re: Odd NSString behavior
- From: Jens Alfke <email@hidden>
- Date: Wed, 24 Feb 2010 11:39:56 -0800
On Feb 24, 2010, at 11:30 AM, McLaughlin, Michael P. wrote:
NSString * linrgPath = [myBundle pathForResource:
@"linrg2.app/Contents/MacOS/linrg2" ofType: @""];
then linrgPath is nil;
This has nothing to do with NSString; you're misusing NSBundle.
-pathForResource: only looks in the Resources subdirectory of the
bundle, and assumes the path is relative to that.
It looks like the method you want is -executablePath.
—Jens_______________________________________________
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