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:)])