On 2006-09-11 12:53:28 +0200 Chris Vetter <chris.vetter@gmail.com> wrote:
[...] OOPS
Need to give a range...
- (NSString*) pathForResource: (NSString*)name
ofType: (NSString*)ext
inDirectory: (NSString*)subPath
forLocalization: (NSString*)localizationName
{
NSArray *array = nil;
NSEnumerator *enumerator = nil;
NSString *path = nil,
*result = nil;
NSRange range;
array = [self pathsForResourcesOfType: ext
inDirectory: subPath
forLocalization: localizationName];
if( array )
{
enumerator = [array objectEnumerator];
while( (path = [enumerator nextObject]) )
{
range = [path rangeOfString: name];
if( range.length )
{
result = path;
}
}
}
return result;
}