Hi,

At Tue, 14 Mar 2000 14:42:40 +0100 , [EMAIL PROTECTED] wrote: 
>It turns out it can't find them: In the +initialize method, I'm using
>       [NSBundle bundleForClass: [self class]];
>and the bundle I'm getting is the main bundle, which doesn't contain=20
>the resource files.

Found the problem myself: The comment before 
[NSBundle +bundleForClass:] says

/* Due to lazy evaluation, we will not find a class if either 
   classNamed: or principalClass has not been called on the 
   particular bundle that contains the class. (FIXME)
*/

Since the +initialize stuff gets called upon loading, I don't get
the chance to call -principalClass on it; so an +initialize method
for a class in the bundle can't access the bundle's resource files.
Shame. (Although the workaround is simple.)

Another question, though: Suppose one writes (as I did in this case)
a class that depends on a number of resource files, but is in the
core sense of the word a library that requires its users to include
certain interface definitions, i.e. Header files. Installing the 
bundle dumps it in $(GNUSTEP_SYSTEM_ROOT)/Local/Libraries but doesn't
right now install any header files anywhere.

This needs to be fixed: "make install" on such a source tree should
put both the bundle and the header files where they belong. The 
question is, where do they belong? Is a Header file a bundle resource
and therefore should go to Bundlename/Headers, or is it a system
resource and goes to $(GNUSTEP_SYSTEM_ROOT)/Local/Headers/Bundlename,
or what?

Regards,
                --Bj�rn
PS Do I make sense at all?

Reply via email to