mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
* Source/NSKeyValueCoding.m ([-takeStoredValuesFromDictionary:]):
Implemented. * Headers/gnustep/base/NSKeyValueCoding.h: Ditto. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@16012 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
690ce58ebe
commit
e6e695d2b1
3 changed files with 26 additions and 1 deletions
|
@ -220,6 +220,24 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (void) takeStoredValuesFromDictionary: (NSDictionary*)aDictionary
|
||||
{
|
||||
NSEnumerator *enumerator = [aDictionary keyEnumerator];
|
||||
NSNull *null = [NSNull null];
|
||||
NSString *key;
|
||||
|
||||
while ((key = [enumerator nextObject]) != nil)
|
||||
{
|
||||
id obj = [aDictionary objectForKey: key];
|
||||
|
||||
if (obj == null)
|
||||
{
|
||||
obj = nil;
|
||||
}
|
||||
[self takeStoredValue: obj forKey: key];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) takeValue: (id)anObject forKey: (NSString*)aKey
|
||||
{
|
||||
unsigned size;
|
||||
|
@ -301,7 +319,7 @@
|
|||
|
||||
while ((key = [enumerator nextObject]) != nil)
|
||||
{
|
||||
id obj = [aDictionary objectForKey: key];
|
||||
id obj = [aDictionary objectForKey: key];
|
||||
|
||||
if (obj == null)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue