mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
2004-11-30 Matt Rice <ratmice@yahoo.com>
* Source/NSBundle.m (-principalClass): If the class specified in NSPrincipalClass key is not found return the first class found. * Headers/Foundation/NSBundle.h (-principalClass): Document the above. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20401 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5a92bdd749
commit
e91474be65
3 changed files with 11 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-11-30 Matt Rice <ratmice@yahoo.com>
|
||||
|
||||
* Source/NSBundle.m (-principalClass): If the class specified in
|
||||
NSPrincipalClass key is not found return the first class found.
|
||||
* Headers/Foundation/NSBundle.h (-principalClass): Document the above.
|
||||
|
||||
2004-11-29 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* configure.ac: Check for libffi or callback/avcall libs
|
||||
|
|
|
@ -189,9 +189,9 @@ GS_EXPORT NSString* const NSLoadedClasses;
|
|||
|
||||
/** Returns the principal class of the bundle. This is the class
|
||||
specified by the NSPrincipalClass key in the Info-gnustep property
|
||||
list contained in the bundle. If this key is not found, the
|
||||
class returned is arbitrary, although it is typically the first
|
||||
class compiled into the archive.
|
||||
list contained in the bundle. If this key or the specified class
|
||||
is not found, the class returned is arbitrary, although it is
|
||||
typically the first class compiled into the archive.
|
||||
*/
|
||||
- (Class) principalClass;
|
||||
|
||||
|
|
|
@ -1077,7 +1077,8 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
{
|
||||
_principalClass = NSClassFromString(class_name);
|
||||
}
|
||||
else if ([_bundleClasses count])
|
||||
|
||||
if (!_principalClass && [_bundleClasses count])
|
||||
{
|
||||
_principalClass = [[_bundleClasses objectAtIndex: 0]
|
||||
nonretainedObjectValue];
|
||||
|
|
Loading…
Reference in a new issue