git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21341 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2005-06-22 09:09:40 +00:00
parent 4aab090090
commit ac5ecec04f
3 changed files with 15 additions and 7 deletions

View file

@ -1,3 +1,11 @@
2005-06-22 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSKeyValueCoding.m:
* Headers/Foundation/NSKeyValueCoding.h:
Change NSUnknownKeyException to NSUndefinedKeyException for
MacOSX compatibility.
Fixes bug #13842
2005-06-21 Richard Frith-Macdonald <rfm@gnu.org> 2005-06-21 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSBundle.m: ([-initWithPath:]) expand paths with tildes. * Source/NSBundle.m: ([-initWithPath:]) expand paths with tildes.

View file

@ -36,7 +36,7 @@
#ifndef STRICT_OPENSTEP #ifndef STRICT_OPENSTEP
/** An exception for an unknown key in [NSObject(NSKeyValueCoding)]. */ /** An exception for an unknown key in [NSObject(NSKeyValueCoding)]. */
GS_EXPORT NSString* const NSUnknownKeyException; GS_EXPORT NSString* const NSUndefinedKeyException;
/** /**
* <p>This describes an informal protocol for <em>key-value coding</em>, a * <p>This describes an informal protocol for <em>key-value coding</em>, a
@ -142,7 +142,7 @@ GS_EXPORT NSString* const NSUnknownKeyException;
* Invoked when -setValue:forKey: / -takeStoredValue:forKey: are called with * Invoked when -setValue:forKey: / -takeStoredValue:forKey: are called with
* a key which can't be associated with an accessor method or instance * a key which can't be associated with an accessor method or instance
* variable. Subclasses may override this method to add custom handling. * 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 * containing NSTargetObjectUserInfoKey with the receiver an
* NSUnknownUserInfoKey with the supplied key entries.<br /> * NSUnknownUserInfoKey with the supplied key entries.<br />
* Called when the key passed to -setValue:forKey: cannot be used. * 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, * Invoked when -valueForKey: / -storedValueForKey: are called with a key,
* which can't be associated with an accessor method or instance variable. * which can't be associated with an accessor method or instance variable.
* Subclasses may override this method to add custom handling. NSObject * 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 * NSTargetObjectUserInfoKey with the receiver an NSUnknownUserInfoKey with
* the supplied key entries.<br /> * the supplied key entries.<br />
*/ */

View file

@ -37,7 +37,7 @@
#include "Foundation/NSKeyValueCoding.h" #include "Foundation/NSKeyValueCoding.h"
#include "Foundation/NSNull.h" #include "Foundation/NSNull.h"
NSString* const NSUnknownKeyException = @"NSUnknownKeyException"; NSString* const NSUndefinedKeyException = @"NSUndefinedKeyException";
@implementation NSObject(KeyValueCoding) @implementation NSObject(KeyValueCoding)
@ -82,7 +82,7 @@ NSString* const NSUnknownKeyException = @"NSUnknownKeyException";
(aKey ? aKey : @"(nil)"), (aKey ? aKey : @"(nil)"),
@"NSUnknownUserInfoKey", @"NSUnknownUserInfoKey",
nil]; nil];
NSException *exp = [NSException exceptionWithName: NSUnknownKeyException NSException *exp = [NSException exceptionWithName: NSUndefinedKeyException
reason: @"Unable to find value for key" reason: @"Unable to find value for key"
userInfo: dict]; userInfo: dict];
@ -100,7 +100,7 @@ NSString* const NSUnknownKeyException = @"NSUnknownKeyException";
(aKey ? aKey : @"(nil)"), (aKey ? aKey : @"(nil)"),
@"NSUnknownUserInfoKey", @"NSUnknownUserInfoKey",
nil]; nil];
NSException *exp = [NSException exceptionWithName: NSUnknownKeyException NSException *exp = [NSException exceptionWithName: NSUndefinedKeyException
reason: @"Unable to set value for key" reason: @"Unable to set value for key"
userInfo: dict]; userInfo: dict];
GSOnceMLog(@"This method is deprecated, use -setValue:forUndefinedKey:"); GSOnceMLog(@"This method is deprecated, use -setValue:forUndefinedKey:");
@ -697,7 +697,7 @@ NSString* const NSUnknownKeyException = @"NSUnknownKeyException";
(aKey ? aKey : @"(nil)"), (aKey ? aKey : @"(nil)"),
@"NSUnknownUserInfoKey", @"NSUnknownUserInfoKey",
nil]; nil];
exp = [NSException exceptionWithName: NSUnknownKeyException exp = [NSException exceptionWithName: NSUndefinedKeyException
reason: @"Unable to find value for key" reason: @"Unable to find value for key"
userInfo: dict]; userInfo: dict];