From ac5ecec04f7a224ce85f499bd54fad7d400ce36e Mon Sep 17 00:00:00 2001 From: Richard Frith-Macdonald Date: Wed, 22 Jun 2005 09:09:40 +0000 Subject: [PATCH] Fix for bug #13482 git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21341 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 8 ++++++++ Headers/Foundation/NSKeyValueCoding.h | 6 +++--- Source/NSKeyValueCoding.m | 8 ++++---- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index a5c268fe6..d053653c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-06-22 Richard Frith-Macdonald + + * Source/NSKeyValueCoding.m: + * Headers/Foundation/NSKeyValueCoding.h: + Change NSUnknownKeyException to NSUndefinedKeyException for + MacOSX compatibility. + Fixes bug #13842 + 2005-06-21 Richard Frith-Macdonald * Source/NSBundle.m: ([-initWithPath:]) expand paths with tildes. diff --git a/Headers/Foundation/NSKeyValueCoding.h b/Headers/Foundation/NSKeyValueCoding.h index 27625fc3a..57ae524cf 100644 --- a/Headers/Foundation/NSKeyValueCoding.h +++ b/Headers/Foundation/NSKeyValueCoding.h @@ -36,7 +36,7 @@ #ifndef STRICT_OPENSTEP /** An exception for an unknown key in [NSObject(NSKeyValueCoding)]. */ -GS_EXPORT NSString* const NSUnknownKeyException; +GS_EXPORT NSString* const NSUndefinedKeyException; /** *

This describes an informal protocol for key-value coding, a @@ -142,7 +142,7 @@ GS_EXPORT NSString* const NSUnknownKeyException; * Invoked when -setValue:forKey: / -takeStoredValue:forKey: are called with * a key which can't be associated with an accessor method or instance * variable. Subclasses may override this method to add custom handling. - * NSObject raises an NSUnknownKeyException, with a userInfo dictionary + * NSObject raises an NSUndefinedKeyException, with a userInfo dictionary * containing NSTargetObjectUserInfoKey with the receiver an * NSUnknownUserInfoKey with the supplied key entries.
* Called when the key passed to -setValue:forKey: cannot be used. @@ -336,7 +336,7 @@ GS_EXPORT NSString* const NSUnknownKeyException; * Invoked when -valueForKey: / -storedValueForKey: are called with a key, * which can't be associated with an accessor method or instance variable. * Subclasses may override this method to add custom handling. NSObject - * raises an NSUnknownKeyException, with a userInfo dictionary containing + * raises an NSUndefinedKeyException, with a userInfo dictionary containing * NSTargetObjectUserInfoKey with the receiver an NSUnknownUserInfoKey with * the supplied key entries.
*/ diff --git a/Source/NSKeyValueCoding.m b/Source/NSKeyValueCoding.m index fde5ed886..bee1629bc 100644 --- a/Source/NSKeyValueCoding.m +++ b/Source/NSKeyValueCoding.m @@ -37,7 +37,7 @@ #include "Foundation/NSKeyValueCoding.h" #include "Foundation/NSNull.h" -NSString* const NSUnknownKeyException = @"NSUnknownKeyException"; +NSString* const NSUndefinedKeyException = @"NSUndefinedKeyException"; @implementation NSObject(KeyValueCoding) @@ -82,7 +82,7 @@ NSString* const NSUnknownKeyException = @"NSUnknownKeyException"; (aKey ? aKey : @"(nil)"), @"NSUnknownUserInfoKey", nil]; - NSException *exp = [NSException exceptionWithName: NSUnknownKeyException + NSException *exp = [NSException exceptionWithName: NSUndefinedKeyException reason: @"Unable to find value for key" userInfo: dict]; @@ -100,7 +100,7 @@ NSString* const NSUnknownKeyException = @"NSUnknownKeyException"; (aKey ? aKey : @"(nil)"), @"NSUnknownUserInfoKey", nil]; - NSException *exp = [NSException exceptionWithName: NSUnknownKeyException + NSException *exp = [NSException exceptionWithName: NSUndefinedKeyException reason: @"Unable to set value for key" userInfo: dict]; GSOnceMLog(@"This method is deprecated, use -setValue:forUndefinedKey:"); @@ -697,7 +697,7 @@ NSString* const NSUnknownKeyException = @"NSUnknownKeyException"; (aKey ? aKey : @"(nil)"), @"NSUnknownUserInfoKey", nil]; - exp = [NSException exceptionWithName: NSUnknownKeyException + exp = [NSException exceptionWithName: NSUndefinedKeyException reason: @"Unable to find value for key" userInfo: dict];