• 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
Re: Subclassing in plugins
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subclassing in plugins


  • Subject: Re: Subclassing in plugins
  • From: Stéphane Sudre <email@hidden>
  • Date: Fri, 25 Oct 2002 12:59:26 +0200

On Friday, October 25, 2002, at 12:19 PM, Drew McCormack wrote:

I would like to be able to write subclasses in a plugin, of a base class in my app. I recently read an article on MacDevCenter by Mike Beam which does just that: He has a filter class (IAFilter.h and IAFilter.m) defined in both the main application, and the plugin, and he subclasses it in the plugin.

I actually thought this would cause problems, because you end up with two implementations of the class, even though they are the same. It seems I was right. If I look at the console when I try this trick, I get errors of this type for all classes that are implemented in both the app and plugin:

Oct 25 11:45:01 Drew-McCormacks-Computer /Users/cormack/Cocoa programs/Dynasity/build/Dynasity.app/Contents/MacOS/Dynasity: objc: Both /Users/cormack/Cocoa programs/Dynasity/build/Dynasity.app/Contents/MacOS/Dynasity and /Users/cormack/Cocoa programs/Dynasity/build/XYZ Reader.plugin/Contents/MacOS/XYZ Reader have implementations of class Molecule.

Also my app crashes, and when I try to debug it, it exits with status 1, with no output, at the following line:

return [Molecule class];

The Molecule class is one of the classes duplicated in the main app and the plugin. I thus conclude that including a class implementation in both the main app and one or more plugins is illegal, and that someone should tell Mike Beam. Is this conclusion correct?

Yes and no.

I'm getting this message when I have the Root class to be implemented in multiple plug-in but the runtime is selecting one by itself and as it's the same it does not cause any problem except for this message.

Side note: I don't remember putting in my main app the implementation of the plug-in root class.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: 
 >Subclassing in plugins (From: Drew McCormack <email@hidden>)

  • Prev by Date: Re: CarbonWindow in CocoaApp
  • Next by Date: screensize-dependent interface?
  • Previous by thread: Re: Subclassing in plugins
  • Next by thread: CarbonWindow in CocoaApp
  • Index(es):
    • Date
    • Thread