Hi,

I have a superclass which has a "modified" BOOL property and a bunch of subclasses based on it. When any property is changed, I need to set this flag to YES. I can either write a setter for all properties and set this flag there, or observe all properties and set the flag in -observeValueForKeyPath. Both approach involve a lot of boilerplate coding (some subclasses have 20+ properties).

I thought about using -keyPathsForValuesAffectingModified: but I don't see how I can set a flag using this.

Any ideas?

Thanks,

Andre Masse
_______________________________________________

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