Re: Plugin Interface
Re: Plugin Interface
- Subject: Re: Plugin Interface
- From: Douglas Davidson <email@hidden>
- Date: Mon, 25 Jun 2001 10:34:24 -0700
On Monday, June 25, 2001, at 10:24 AM, David Remahl wrote:
I have tried to read the documentation on CFPlugin, but the document is
naturally quite carbon-centered, but it should be possible to apply to
cocoa as well, eh? Is there an example of a Cocoa application using
CFPlugin to handle some of its interface (or otherwise). For example,
Brian Webster, couldn't you share the source of the Dockling glue?
If you are using Cocoa, you probably don't want to use CFPlugIn. What
CFPlugIn does is to manage the interfaces between host and plugin, as
tables of function pointers, primarily for use with C and C++; in
Objective C and Java, that sort of thing is mostly handled automatically
for you by the runtime. Bundles containing Objective C and Java should
be loaded using NSBundle rather than CFBundle/CFPlugIn.
All of this is pretty much unrelated to the question of how your plugin
connects to your views and other UI elements, which depends very much on
exactly what you are going to be creating and how you decide to factor
things between plugin and host.
You probably want to take a look at some examples of Cocoa apps with
plugins; you can probably find some examples of screensaver plugins
around, for example, or you can search the list archives--I know there
have been questions and answers on this topic before.
Douglas Davidson