mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +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
|
@ -1,3 +1,9 @@
|
|||
2003-02-19 David Ayers <d.ayers@inode.at>
|
||||
|
||||
* Source/NSKeyValueCoding.m ([-takeStoredValuesFromDictionary:]):
|
||||
Implemented here instead of in GDL2.
|
||||
* Headers/gnustep/base/NSKeyValueCoding.h: Ditto.
|
||||
|
||||
2003-02-18 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* NSObject.m: ([+instancesRespondToSelector:]),([-respondsToSelector])
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
- (void) handleTakeValue: (id)anObject forUnboundKey: (NSString*)aKey;
|
||||
- (id) storedValueForKey: (NSString*)aKey;
|
||||
- (void) takeStoredValue: (id)anObject forKey: (NSString*)aKey;
|
||||
- (void) takeStoredValuesFromDictionary: (NSDictionary*)aDictionary;
|
||||
- (void) takeValue: (id)anObject forKey: (NSString*)aKey;
|
||||
- (void) takeValue: (id)anObject forKeyPath: (NSString*)aKey;
|
||||
- (void) takeValuesFromDictionary: (NSDictionary*)aDictionary;
|
||||
|
|
|
@ -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…
Reference in a new issue