Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The application supporting plug-ins



Hi Noria,

What do you want the plug-ins to do? If you going to write the plug-ins
yourself, there should be a strong technical reason why that would be better
than just putting the code in the application. If you are going to make it
so other people can write plug-ins for your application, you have to think
about who you want writing plug-ins, and what you would like them to do for
you. Assuming you can't pay them, you want to make it so they can sell their
plug-ins to customers, or so they will think it is so cool they will write
plug-ins just for fun.

The idea about hooking into DoToolboxEvent would allow plug-ins to work, but
there are two problems I can think of: The plug-ins could handle events that
aren't really for them. Also, it might be hard to write the plug-in. Does
the plug-in need to be able to create multiple windows? If it just needs a
place to draw, maybe you could have a view that holds a plug-in. But it
depends on what you want the plug-ins to do.

If you start with an idea of what kind of features you would like the
plug-ins to add, and who would be writing plug-ins, then you can design an
API that enables those people to add the features you want.

I suggest you look at other plug-in SDKs to see how they do it. You
mentioned After Dark plug-ins. I think the SDK comes with After Dark.
They're pretty simple. The Photoshop plug-in SDK can be downloaded from
Adobe's web site. Photoshop plug-ins can be complex -- there are many kinds
of them. There's also the iTunes visual plug-in SDK, the Netscape browser
plug-in SDK, QuickTime (components are plug-ins), and the SDK for creating
RealBASIC controls. If there is a plug-in SDK that is close to what you
want, you may not have to get people to write plug-ins for you, because you
could write your application to call plug-ins that are already there.

Tom

On 5/9/02 6:26 AM, Norio Ota wrote:
> I'd like to make the applications which support plug-ins like
> Photoshop, AfterDark, so on.
>
> How should I implement with MacApp? Of cause I don't know even
> without MacApp. I wonder I need to override TDispatch::DoToolBoxEvent
> or each virtual functions in the method should be overrided.
>
> For instance, MyApp class, which is subclass of TApplication, suppose
> to has fPluginsList and add plug-ins in the list. Then the overrided
> DoToolBoxEvent (or each virtual functions in the method) suppose to call
> (*main)(short eventSelector, EventRecord * evRec....).
> Is this good? I really don't know how, so if you have any idea or
> suggestion, I'd appreciate it.

--
Tom Becker "Within C++, there is a much smaller and
Object-Oriented Propeller Head cleaner language struggling to get out."
<email@hidden> -- Bjarne Stroustrup
_______________________________________________
macapp-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macapp-dev
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.