diff --git a/ChangeLog b/ChangeLog index 2066323..ddb3ba3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-03-10 David Ayers + + * EOControl/EOKeyValueCoding: (-unableToSetNullForKey:): Deprecate + and call unableToSetNilForKey. + (-setNilValueForKey:): Call unableToSetNilForKey. + (-unableToSetNilForKey:): Use default implementation. + 2005-03-03 David Ayers * EOAccess/EODatabaseContext.m (-forgetSnapshotForGlobalID:): diff --git a/EOControl/EOKeyValueCoding.h b/EOControl/EOKeyValueCoding.h index 902a504..67f9b43 100644 --- a/EOControl/EOKeyValueCoding.h +++ b/EOControl/EOKeyValueCoding.h @@ -105,13 +105,14 @@ * This method is invoked by the EOKeyValueCoding mechanism when an attempt * is made to set an null value for a scalar attribute. This implementation * raises an NSInvalidArgument exception.
- * The NSKeyValueCoding -unableToSetNilForKey: and -setNilValueForKey: - * are overriden to invoke this + * Contrary to the TOC of the documentation, this method is called + * unableToSetNilForKey: and not unableToSetNullForKey:
+ * The NSKeyValueCoding -setNilValueForKey: is overriden to invoke this * method instead. We manipulate the runtime to insure that our implementation * of unableToSetNilForKey: is used in favor of the one in gnustep-base or * Foundation. */ -- (void)unableToSetNullForKey: (NSString *)key; +- (void)unableToSetNilForKey: (NSString *)key; @end diff --git a/EOControl/EOKeyValueCoding.m b/EOControl/EOKeyValueCoding.m index d303009..9b71d48 100644 --- a/EOControl/EOKeyValueCoding.m +++ b/EOControl/EOKeyValueCoding.m @@ -104,14 +104,15 @@ initialize(void) @selector(GDL2KVCNSObjectICategoryID), YES); } -- (void) unableToSetNilForKey: (NSString *)key +- (void) unableToSetNullForKey: (NSString *)key { - [self unableToSetNullForKey: key]; + GSOnceMLog(@"This method is deprecated, use -unableToSetNilForKey:!"); + [self unableToSetNilForKey: key]; } - (void) setNilValueForKey: (NSString *)key { - [self unableToSetNullForKey: key]; + [self unableToSetNilForKey: key]; } /* See EODeprecated.h. */ @@ -125,7 +126,7 @@ initialize(void) } /* See header file for documentation. */ -- (void) unableToSetNullForKey: (NSString *)key +- (void) unableToSetNilForKey: (NSString *)key { [NSException raise: NSInvalidArgumentException format: @"%@ -- %@ 0x%x: Given nil value to set for key \"%@\"",