On Oct 6, 2011, at 6:22 PM, Quincey Morris wrote: > It occurs to me that there may be a lower-tech solution. If you created an > abstract superclass of the class whose setters you wanted to override, you > could synthesize the properties in the superclass, override them normally, > and call super in the subclass. There's still a bit of ugliness in this > approach (e.g. you have to expose the private superclass in the subclass's > public .h file), though not much perhaps. Also, since the compilers have been > getting pickier in their recent versions regarding the way property methods > are defined, there may turn out to be a compile-time obstacle, but in > principle I think this approach should work -- you'd basically be getting the > compiler to delve into the runtime for you.
But isn't creating a whole abstract superclass for this a lot more of a hassle than just making a private property? What would you get from that approach that you wouldn’t get from just having the getters and setters for a property “foo” call through to the synthesized accessors for a private property “privateFoo”? Charles_______________________________________________ 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