[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
NSBundle -pathForResource:ofType: on Windows
From: |
Björn Giesler |
Subject: |
NSBundle -pathForResource:ofType: on Windows |
Date: |
Wed, 8 Feb 2006 08:29:32 +0100 |
Hi,
sorry for posting this to discuss-, but my postings to dev- don't
seem to go through very well.
I'm *this* close to getting AddressManager running on Windows. For
some reason, however, I can't load resources from frameworks. Here's
the code:
+ (void) loadResources
{
NSBundle *b; NSString *filename;
b = [NSBundle bundleForClass: self];
NSLog(@"Bundle for %@ is at %@\n", self, b);
if(b) NSLog(@"...and its path is at %@\n", [b bundlePath];
filename = [b pathForResource: @"Labels" ofType: @"dict"];
NSLog(@"Loading labels from %@\n", filename);
// ...
}
...and the output is
Bundle forADPersonView is at <NSBundle: 12c0f58>
...and its path is at c:/GNUstep/Local/Library/Frameworks/
AddressView.framework
Loading labels from (nil)
Looking at the sources, they seem to do what they should...
Unfortunately, I can't debug into -gui on Windows. Can anyone see
what's going on? Resources/Labels.dict exists directly beneath the
bundle path, of course, and is readable.
(Replacing the "filename=" line with filename = [[b bundlePath]
stringByAppendingString: @"/Resources/Labels.dict"] works, of course,
but that isn't what's intended...)
Thanks in Advance,
Björn
- NSBundle -pathForResource:ofType: on Windows,
Björn Giesler <=