• 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
objc [66375] class Foo is implemented in both BundleA and BundleB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

objc [66375] class Foo is implemented in both BundleA and BundleB


  • Subject: objc [66375] class Foo is implemented in both BundleA and BundleB
  • From: Jeff Szuhay <email@hidden>
  • Date: Tue, 10 May 2016 23:05:24 -0700

Class Foo is a base class. It is subclassed in BundleA,  BundleB, … BundleZ.
The runtime still throws that message, regardless. There are one or two
methods implemented in the base class and not in the subclasses.

You can see this effect if you download, build, and run Apple’s BundleLoader
sample program.

Is this a real issue? or an artifact of inheritence?

Is there a better way to do it? I can’t currently how to have a singleton base class
implementation that is shared among two or more bundles.

I suppose I could implement the base class in the bundle loader but that seems
to engender too tight a coupling between the bundleLoader and its bundles.
(smells bad).

A protocol will solve it but is undesirable since the base class methods would then
have to be duplicated in each subclass (smells bad).

If using a category is the solution, I suppose then I’m asking for a good example of
that. (Maybe BundleLoader could be revised to show that.)

Thanks,
Jeff


_______________________________________________

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: objc [66375] class Foo is implemented in both BundleA and BundleB
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: Receiver type for instance message is a forward declaration
  • Next by Date: Re: objc [66375] class Foo is implemented in both BundleA and BundleB
  • Previous by thread: Re: presentationControllerForPresentedViewController(…) is called multiple times
  • Next by thread: Re: objc [66375] class Foo is implemented in both BundleA and BundleB
  • Index(es):
    • Date
    • Thread