|
From: | Chris Vetter |
Subject: | Re: NSBundle: method not implemented. |
Date: | Mon, 11 Sep 2006 12:53:28 +0200 |
The method pathForResource: ofType: inDirectory: forLocalization: is not implemented in the class NSBundle. (In gnustep-base 1.13.0).If somemone have the skills, the time and want to implement it for the next release ... I will be really, really grateful for that !!!
Untested but should work as expected. - (NSString*) pathForResource: (NSString*)name ofType: (NSString*)ext inDirectory: (NSString*)subPath forLocalization: (NSString*)localizationName { NSArray *array = nil; NSEnumerator *enumerator = nil; NSString *path = nil, *result = nil; array = [self pathsForResourcesOfType: ext inDirectory: subPath forLocalization: localizationName]; if( array ) { enumerator = [array objectEnumerator]; while( (path = [enumerator nextObject]) ) { if( [path rangeOfString: name] ) { result = path; } } } return result; } -- Chris
[Prev in Thread] | Current Thread | [Next in Thread] |