* Source/GSGormLoading.m: (-[GSNibItem initWithCoder:]) initialize

NSApplication and subclasses using sharedApplication.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27270 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
gcasa 2008-12-10 04:22:05 +00:00
parent 230e968b4f
commit 43a0bf73b8
2 changed files with 14 additions and 3 deletions

View file

@ -557,14 +557,20 @@ static NSString *GSInternalNibItemAddedNotification = @"_GSInternalNibItemAddedN
format: @"Unable to find class '%@', it is not linked into the application.", theClass];
}
obj = [cls allocWithZone: [self zone]];
if (theFrame.size.height > 0 && theFrame.size.width > 0)
{
obj = [obj initWithFrame: theFrame];
obj = [[cls allocWithZone: [self zone]] initWithFrame: theFrame];
}
else
{
obj = [obj init];
if(GSObjCIsKindOf(cls, [NSApplication class]))
{
obj = [cls sharedApplication];
}
else
{
obj = [[cls allocWithZone: [self zone]] init];
}
}
if ([obj respondsToSelector: @selector(setAutoresizingMask:)])