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

Re: resourcePath


  • Subject: Re: resourcePath
  • From: "David P. Henderson" <email@hidden>
  • Date: Thu, 23 Aug 2001 00:21:27 -0400

On Wednesday, August 22, 2001, at 11:59 , Michael Stone wrote:

> I'm using NSBundle's resourcePath to get a full path to my resource
> directory (for example, .../Contents/Resources), but I would like to
> get the localized version (for example if I'm currently using English,
> .../Contents/Resources/English.lproj). I can't seem to find a selector
> for that. Does anyone know how this might be done?
>
Try using -pathForResource:ofType: instead of -resourcePath.
-pathForResource:ofType: takes a filename and file type (aka extension)
and searches your bundle's resource folder for a non-localized version;
then, if none exists, an appropriate localized version. AppKit adds a
couple convenience methods for finding image and sound resources.

Dave
--
Chaos Assembly Werks
"Suburbia is where the developer bulldozes out the trees, then names the
streets after them."
- Bill Vaughn


References: 
 >resourcePath (From: Michael Stone <email@hidden>)

  • Prev by Date: Use of performGammaFade in ScreenSavers
  • Next by Date: Re: Use of performGammaFade in ScreenSavers
  • Previous by thread: resourcePath
  • Next by thread: NSURL question
  • Index(es):
    • Date
    • Thread