Re: plugin theory
Re: plugin theory
- Subject: Re: plugin theory
- From: Ondra Cada <email@hidden>
- Date: Mon, 10 Apr 2006 15:24:51 +0200
Uli,
On 10.4.2006, at 8:45, Uli Kusterer wrote:
You can also add keys to the Info.plist or some property list file
of your own design inside the plugin bundle. Then you can use those
keys to get some basic information about a plugin *before* you
decide whether you'll even load the class. That way, you can e.g.
have importer plugins not loaded until the user actually exports to
that particular file format.
There's more magic in there, if you wanna play :)
My pet trick is making pug-ins to load on-demand whenever a class or
a category from a plugin is used first time: for small projects with
just a few bundles it would be an overkill, but we have used this for
a truly big project which had tens and tens of bundles, and it saved
us *much* time and effort. The one drawback is you have to use
something like "[CLASS(MyClass) alloc]" instead of "[MyClass alloc]",
and that you have to mess up a bit with the build process to generate
a list of classes and categories into plists in bundles, but that was
a good price (even then when there were no build phases and one had
to play with a bunch of makefiles :)).
(Note: before implementing the trick we have feared it would slow the
app too much. Just as always, it proved premature optimization is a
bitch -- it ran like a blue lightning on G3's and poor Intel 80486
based boxes /the latter in OpenStep for Windows/.)
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden