• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Multiple Inheritance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multiple Inheritance


  • Subject: Multiple Inheritance
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Thu, 24 May 2012 16:14:45 +0700

I have an abstract class M with subclasses MAB, MAX, MXB.

There are several lengthy methods A which are used in MAB and MAX, and others methods B which are used in MAB and MXB.

Methods A use a property NSUInteger index.
Class MXB has no such property, is has NSIndexSet *indices instead.

Similar for methods B.

Currently these common methods are present in both classes.
But: this is less than perfect - meaning that each change has to be done twice.

What to do?
Have a file methodsA.m which is included in both MAB and MAX (and same for methodsB.m) ?

Other, better solutions?


Kind regards,

Gerriet.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Multiple Inheritance
      • From: Jens Alfke <email@hidden>
    • Re: Multiple Inheritance
      • From: Ken Thomases <email@hidden>
    • Re: Multiple Inheritance
      • From: Thomas Davie <email@hidden>
    • Re: Multiple Inheritance
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: stringWithFormat / Rendering Text (iOS)
  • Next by Date: Re: stringWithFormat / Rendering Text (iOS)
  • Previous by thread: Re: Arc and autorelease
  • Next by thread: Re: Multiple Inheritance
  • Index(es):
    • Date
    • Thread