• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Odd NSString behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Odd NSString behavior (From: "McLaughlin, Michael P." <email@hidden>)

  • Prev by Date: Re: Deprecated APIs
  • Next by Date: Re: Deprecated APIs
  • Previous by thread: Re: Odd NSString behavior
  • Next by thread: Re: Odd NSString behavior
  • Index(es):
    • Date
    • Thread