Re: resourcePath
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>) |