Re: NSBundle and PlugIns
Re: NSBundle and PlugIns
- Subject: Re: NSBundle and PlugIns
- From: Frank Midgley <email@hidden>
- Date: Fri, 11 Jun 2004 10:17:05 -0500
On Jun 5, 2004, at 5:24PM, Ondra Cada wrote:
On 6.6.2004, at 0:07, Jim Witte wrote:
As a workaround, could you load the new plugin under a different
"name" like a C++ overloaded name (or descriptor or whatever), use
that until the app quits, and then have it load the plugin as normal
on the next application launch?
Forget it. Class and category names (and others) would clash. Well most
probably it *is* doable after all (with the level of flexibility of
ObjC nearly anything goes); heck, I guess you'd be able to rig your own
"unloader", which would programmatically restore the class information,
purging so whatever was loaded from the bundle. Nevertheless, it would
be *lotta* work!
If you desperately need a feel of that, implement an automatic
more-or-less seamless relaunch of your app. Save its state and restore
it automatically after the relaunch. With a good overall design, that's
a few source lines ;)
The only way I know to pull this off is to load the plug-in in a helper
process and use IPC (DO, AppleEvents, etc.) to talk to the plug-in.
It's slower and takes more setup, but you can kill and relaunch the
process to load a newer plug-in and it insulates your app from any
crashes that the plug-in code might trigger.
-Frank
------------------------------------
Frank M. Midgley
email@hidden
http://homepage.mac.com/knarf/
_______________________________________________
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.