One Quickie


Custom Accessor Methods (scalar) (Core Data->General)
Say there's a float ivar called radius
- (float) radius
{
    [self willAccessValueForKey: @"radius"];
    float f = radius;
    [self didAccessvalueForKey: @"radius"];

   return (f);

} // radius


- (void) setRadius: (float) newRadius
{
    [self willChangeValueForKey: @"radius"];
    radius = newRadius;
    [self didChangeValueForKey: @"radius"];

} // setRadius



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

webmonster@borkware.com