bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBundle: method not implemented.


From: Christophe JALADY
Subject: Re: NSBundle: method not implemented.
Date: Wed, 13 Sep 2006 21:20:37 +0200
User-agent: Thunderbird 1.5.0.5 (X11/20060812)

Thank you very much !!
If the gnustep-base maintener could add it for the next release it will be wonderfull !

Thanks again.

Christophe.

Chris Vetter wrote:
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;
}






reply via email to

[Prev in Thread] Current Thread [Next in Thread]