mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Added renamed MacOSX methodAdded renamed MacOSX method..
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@18648 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b4a4e78ab9
commit
7fce31a3fb
3 changed files with 24 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-02-24 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/Foundation/NSDictionary.h:
|
||||
* Source/NSDictionary.m: (-setValue:forKey:)
|
||||
Added MacOSX method with same implementation as takeValue:forKey:
|
||||
|
||||
2004-02-24 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GSFormat.m: Fix buffer overrun by strlen() when printing
|
||||
|
|
|
@ -92,6 +92,7 @@
|
|||
#ifndef STRICT_OPENSTEP
|
||||
- (void) takeStoredValue: (id)value forKey: (NSString*)key;
|
||||
- (void) takeValue: (id)value forKey: (NSString*)key;
|
||||
- (void) setValue: (id)value forKey: (NSString*)key;
|
||||
#endif
|
||||
@end
|
||||
|
||||
|
|
|
@ -1143,4 +1143,21 @@ compareIt(id o1, id o2, void* context)
|
|||
[self setObject: value forKey: key];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Default implementation for this class is equivalent to the
|
||||
* -setObject:forKey: method unless value is nil, in which case
|
||||
* it is equivalent to -removeObjectForKey:
|
||||
*/
|
||||
- (void) setValue: (id)value forKey: (NSString*)key
|
||||
{
|
||||
if (value == nil)
|
||||
{
|
||||
[self removeObjectForKey: key];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self setObject: value forKey: key];
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue