Odd NSString behavior
Odd NSString behavior
- Subject: Odd NSString behavior
- From: "McLaughlin, Michael P." <email@hidden>
- Date: Wed, 24 Feb 2010 14:30:23 -0500
- Acceptlanguage: en-US
- Thread-topic: Odd NSString behavior
This is just a minor glitch but I hate loose ends.
I have a Cocoa app as a resource in my MainBundle. If I try to get its
executable via the obvious
NSString * linrgPath = [myBundle pathForResource:
@"linrg2.app/Contents/MacOS/linrg2" ofType: @""];
then linrgPath is nil;
However, if I split the path into two pieces it works as intended.
NSString * linrgPath = [myBundle pathForResource: @"linrg2.app" ofType:
@""];
linrgPath = [linrgPath stringByAppendingString:@"/Contents/MacOS/linrg2"];
Is this reasonable?
FWIW, the full path expands to 104 chars and contains one space.
--
Mike McLaughlin
_______________________________________________
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