[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NSBundle: method not implemented.
From: |
Chris Vetter |
Subject: |
Re: NSBundle: method not implemented. |
Date: |
Mon, 11 Sep 2006 13:05:21 +0200 |
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;
}
--
Chris