From 59b10a3b5eba0c59c9c88d926aff4db577f96208 Mon Sep 17 00:00:00 2001 From: gcasa Date: Mon, 25 Apr 2005 04:08:10 +0000 Subject: [PATCH] Removed assertion and cleaned up comments. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@21158 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 7 +++++++ Source/GSNibTemplates.m | 7 ++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index ab540a3b5..2fec7c560 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-04-25 00:02 Gregory John Casamento + + * Source/GSNibTemplates.m: [GSClassSwapper initWithObject: + className:superClassName:] removed assertion which prevents + using the same class name for both arguments. Also cleaned + up some commented out code. + 2005-04-17 Fred Kiefer * Source/NSPopupButton.m (-keyDown:) Removed unneeded code. diff --git a/Source/GSNibTemplates.m b/Source/GSNibTemplates.m index d0d13ecf1..480c22549 100644 --- a/Source/GSNibTemplates.m +++ b/Source/GSNibTemplates.m @@ -599,7 +599,6 @@ static NSString *GSInternalNibItemAddedNotification = @"_GSInternalNibItemAddedN NSDebugLog(@"Created template %@ -> %@",NSStringFromClass([self class]), className); ASSIGN(_object, object); ASSIGN(_className, className); - NSAssert(![className isEqualToString: superClassName], NSInvalidArgumentException); _superClass = NSClassFromString(superClassName); if(_superClass == nil) { @@ -951,9 +950,6 @@ static NSString *GSInternalNibItemAddedNotification = @"_GSInternalNibItemAddedN id template = nil; if(object != nil) { - // NSData *objectData = nil; - // [archiver encodeRootObject: object]; - // objectData = [archiver archiverData]; if ([object isKindOfClass: [NSWindow class]]) { template = [[GSWindowTemplate alloc] initWithObject: object @@ -990,8 +986,9 @@ static NSString *GSInternalNibItemAddedNotification = @"_GSInternalNibItemAddedN className: className superClassName: superClassName]; } - else if ([object isKindOfClass: [NSObject class]]) // for gui elements derived from NSObject + else if ([object isKindOfClass: [NSObject class]]) { + // for gui elements derived from NSObject template = [[GSObjectTemplate alloc] initWithObject: object className: className superClassName: superClassName];