Le 28 févr. 2010 à 17:23, Chris Tracewell a écrit :

> I have two synthesized properties - A and B. Whenever A changes I need B to 
> be updated to A.keypath. Is the correct way to do this to override the 
> synthesized setter of A like so?
> 
> -(void)setA:(id)value
>       {
>       A = value
>       [self setB:A.keypath];
>       }
> 
> Thanks.

Overriding the setter is fine, but you should read how to do it properly first:

http://developer.apple.com/mac/library/documentation/cocoa/Conceptual/MemoryMgmt/Articles/mmAccessorMethods.html



-- Jean-Daniel




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to