Slight improvement to previous commit.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@19935 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2004-08-28 20:45:47 +00:00
parent 3d3f002ee3
commit 214c6e9a03
2 changed files with 17 additions and 7 deletions

View file

@ -1,3 +1,9 @@
2004-08-28 16:43 Gregory John Casamento <greg_casamento@yahoo.com>
* GormCustomView.m: Modified _bestPossibleSuperClass to
return NSView if the class isn't defined or is not an
NSView subclass.
2004-08-28 11:00 Gregory John Casamento <greg_casamento@yahoo.com>
* Gorm.m: Added calls to [GSClassSwapper

View file

@ -131,18 +131,22 @@
{
Class cls = [NSView class];
GormClassManager *classManager = [(Gorm *)NSApp classManager];
NSString *superClass = [classManager nonCustomSuperClassOf: theClass];
// get the superclass if one exists...
if(superClass != nil)
if([classManager isSuperclass: @"NSView" linkedToClass: theClass])
{
cls = NSClassFromString(superClass);
if(cls == nil)
NSString *superClass = [classManager nonCustomSuperClassOf: theClass];
// get the superclass if one exists...
if(superClass != nil)
{
cls = [NSView class];
cls = NSClassFromString(superClass);
if(cls == nil)
{
cls = [NSView class];
}
}
}
return cls;
}