File:  [NeXTSTEP 3.3 examples] / Examples / EnterpriseObjects / MasteringDetails / EOFExtensions.subproj / ValueForKey.m
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:48:56 2018 UTC (8 years, 1 month ago) by root
Branches: NeXT, MAIN
CVS tags: NeXTSTEP33, HEAD
Sample Programs from NeXSTEP 3.3

/* ValueForKey.m created by cfeder on Mon 07-Nov-1994 */

#import "ValueForKey.h"

@implementation NSObject (valueForKey)
- valueForKey:(NSString *)key
{
    return [[self valuesForKeys:[NSArray arrayWithObject:key]] objectForKey:key];
}

- (void)takeValue:value forKey:(NSString *)key
{
    [self takeValuesFromDictionary:[NSDictionary dictionaryWithObjects:&value forKeys:&key count:1]];
}
@end

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.