* EOControl/EOKeyValueCoding: (-unableToSetNullForKey:):

Deprecate and call unableToSetNilForKey.
        (-setNilValueForKey:): Call unableToSetNilForKey.
        (-unableToSetNilForKey:): Use default implementation.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20891 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
David Ayers 2005-03-10 21:13:15 +00:00
parent c1baf1e562
commit 27d729bad3
3 changed files with 16 additions and 7 deletions

View file

@ -1,3 +1,10 @@
2005-03-10 David Ayers <d.ayers@inode.at>
* EOControl/EOKeyValueCoding: (-unableToSetNullForKey:): Deprecate
and call unableToSetNilForKey.
(-setNilValueForKey:): Call unableToSetNilForKey.
(-unableToSetNilForKey:): Use default implementation.
2005-03-03 David Ayers <d.ayers@inode.at>
* EOAccess/EODatabaseContext.m (-forgetSnapshotForGlobalID:):

View file

@ -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. <br/>
* 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:<br/>
* 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

View file

@ -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 \"%@\"",