One Quickie


Custom accessor methods (objects) (Core Data->General)
Wrap the methods with will/did Access/Change ValueForKey:, and also use KVC to set primitive values:
- (NSString *) name
{
    [self willAccessValueForKey: @"name"];
    NSString *string = [self primitiveValueForKey: @"name"];
    [self didAccessValueForKey: @"name"];
} // name

- (void) setName: (NSString *) x
{
    [self willChangeValueForKey: @"name"];
    [self setPrimitiveValue: x  forKey: @"name"];
    [self didChangeValueForKey: @"name"];
} // setName



borkware home | products | miniblog | rants | quickies | cocoaheads
Advanced Mac OS X Programming book

webmonster@borkware.com