• 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: Adding Resource Bundles
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding Resource Bundles


  • Subject: Re: Adding Resource Bundles
  • From: "Sean McBride" <email@hidden>
  • Date: Fri, 26 Aug 2005 10:09:04 -0400
  • Organization: Rogue Research

On 2005-08-25 22:08, Achal Oza said:

>#ifdef LINUX
>loadTexture("images/image.bmp");
>#else
>loadTexture("MyApp.app/Contents/Resources/image.bmp");
>#endif

This will break if the user renames MyApp.app, which users can easily do
in the Finder.

>I'm just curios now if there's a cleaner way of doing this? Perhaps
>some preprocessor variable for "MyApp.app/Contents/Resources"?

You can use NSBundle or CFBundle APIs to get that path.  ex: NSBundle's -
mainBundle

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Adding Resource Bundles (From: Achal Oza <email@hidden>)
 >Re: Adding Resource Bundles (From: Scott Tooker <email@hidden>)
 >Re: Adding Resource Bundles (From: Achal Oza <email@hidden>)

  • Prev by Date: Xcode 2.2 Release
  • Next by Date: SOLVED: Re: Using Cocoa Classes With Java Ant In Xcode
  • Previous by thread: Re: Adding Resource Bundles
  • Next by thread: Re: Adding Resource Bundles
  • Index(es):
    • Date
    • Thread