Corrected an issue with nonCustomSuperClassOf:

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@17645 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2003-09-09 02:57:30 +00:00
parent f55c7a8bcc
commit 6d36250f7e
2 changed files with 18 additions and 5 deletions

View file

@ -1,3 +1,11 @@
2003-09-08 Gregory John Casamento <greg_casamento@yahoo.com>
* GormClassManager.m: [nonCustomSuperClassOf:] if the class
passed in is not custom it will return the immediate superclass
of that class. This is to allow the use of the custom class
mechanism to select classes which are not custom but are not
offered in the palettes (i.e. NSSecureTextField).
2003-09-08 Gregory John Casamento <greg_casamento@yahoo.com>
* GormViewWindow.[hm]: Provides a holder for standalone views

View file

@ -1401,14 +1401,19 @@
{
NSString *result = className;
NSAssert([self isCustomClass: className],NSInvalidArgumentException);
// iterate up the chain until a non-custom superclass is found...
while ([self isCustomClass: result])
if(![self isCustomClass: className] && ![className isEqual: @"NSObject"])
{
NSDebugLog(@"result = %@",result);
result = [self superClassNameForClassNamed: result];
}
else
{
// iterate up the chain until a non-custom superclass is found...
while ([self isCustomClass: result])
{
NSDebugLog(@"result = %@",result);
result = [self superClassNameForClassNamed: result];
}
}
return result;
}