Can you use composition in your application to compose an instance of class E with instances of framework classes A through to D?

Kiel ;-)
"Peace cannot be achieved through violence, it can only be attained through understanding."
Albert Einstein

On 20/05/2009, at 10:09 PM, Graham Cox wrote:

I have a base class in a framework, let's call it A. This has a number of subclasses, B C and D.

I have some functionality I'd like to add that would apply to all A, B, C and D. So a category on A would be fine - except that I need some support in the form of a couple of ivars. The added functionality isn't appropriate to the framework, so though I have the source for A, adding ivars that have no place there grieves me.

It also grieves me that the solution appears to be separate subclasses of B, C and D to add the functionality which must be duplicated for each class.

Any solution I've missed?

_______________________________________________

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