From 43a0bf73b8110fa1e1be710d497a19304b0ea496 Mon Sep 17 00:00:00 2001 From: gcasa Date: Wed, 10 Dec 2008 04:22:05 +0000 Subject: [PATCH] * 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 --- ChangeLog | 5 +++++ Source/GSGormLoading.m | 12 +++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 76707b871..296195e3f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-12-09 23:26-EST Gregory John Casamento + + * Source/GSGormLoading.m: (-[GSNibItem initWithCoder:]) initialize + NSApplication and subclasses using sharedApplication. + 2008-12-09 Wolfgang Lux * Source/NSTextView_actions.m (-centerSelectionInVisibleArea:): diff --git a/Source/GSGormLoading.m b/Source/GSGormLoading.m index 3a1370b66..b3001d3c8 100644 --- a/Source/GSGormLoading.m +++ b/Source/GSGormLoading.m @@ -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:)])