From 09d4ded47d33966a87d7547787e92f3a8f9865c1 Mon Sep 17 00:00:00 2001 From: gcasa Date: Wed, 12 Nov 2008 22:58:47 +0000 Subject: [PATCH] * Source/GSNibCompatibility.m: Conditionally call setToolTip if it exists when doing establishConnection on an NSIBHelpConnector. * Source/NSDocumentController.m: Correction to prevent exception when NSDocumentClass isn't specified. This does not cause an issue on Mac OS X. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27031 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 8 ++++++++ Source/GSNibCompatibility.m | 5 ++++- Source/NSDocumentController.m | 13 +++++++++++-- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 56a44be13..85e058909 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-11-12 05:31-EST Gregory John Casamento + + * Source/GSNibCompatibility.m: Conditionally call setToolTip if it + exists when doing establishConnection on an NSIBHelpConnector. + * Source/NSDocumentController.m: Correction to prevent exception when + NSDocumentClass isn't specified. This does not cause an issue on + Mac OS X. + 2008-11-11 Fred Kiefer * Source/NSView.m (-setBoundsOrigin:, -setBoundsRotation:, diff --git a/Source/GSNibCompatibility.m b/Source/GSNibCompatibility.m index 9b6f49917..c6ffffe63 100644 --- a/Source/GSNibCompatibility.m +++ b/Source/GSNibCompatibility.m @@ -1566,7 +1566,10 @@ static BOOL _isInInterfaceBuilder = NO; - (void) establishConnection { - [_dst setToolTip: _marker]; + if([_dst respondsToSelector: @selector(setToolTip:)]) + { + [_dst setToolTip: _marker]; + } } - (void) setFile: (id)file diff --git a/Source/NSDocumentController.m b/Source/NSDocumentController.m index 936c97371..678844586 100644 --- a/Source/NSDocumentController.m +++ b/Source/NSDocumentController.m @@ -1024,8 +1024,17 @@ static NSDictionary *TypeInfoForHumanReadableName (NSArray *types, NSString *typ for (i = 0; i < count; i++) { NSDictionary *typeInfo = [_types objectAtIndex: i]; - - [classNames addObject: [typeInfo objectForKey: NSDocumentClassKey]]; + NSString *className = [typeInfo objectForKey: NSDocumentClassKey]; + + if(className != nil) + { + [classNames addObject: className]; + } + else + { + NSLog(@"WARN: The entry does not have an NSDocumentClass name defined: %@", + typeInfo); + } } return AUTORELEASE(classNames);