Implement both A and B in the base class M, but don't declare them in its 
@interface. Then MAB and MAX can both declare method A and have implementations 
that just call super. Likewise for B.

Or, factor out A into a helper class, and similarly for B. Then have MAB and 
MAX instantiate an A helper object and delegate method A to it.

Or, similarly to #2, implement A and B as functions that take the 'receiver' 
object as the first parameter. Then you can easily implement method -A as a 
call to A(self).

—Jens
_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to