Re: The SampleCMPlugin example
Re: The SampleCMPlugin example
- Subject: Re: The SampleCMPlugin example
- From: Dietmar Planitzer <email@hidden>
- Date: Mon, 04 Mar 2002 00:00:02 +0100
>
From: Girard Iglesias <email@hidden>
>
>
On Sunday, March 3, 2002, at 11:57 AM, Finlay Dobbie wrote:
>
>
> There is no reason why you can't use Cocoa inside a contextual menu
>
> plugin. Of course, AppKit probably won't work (since the plugin can be
>
> called from a Carbon application), but I think Foundation will be OK.
>
>
>
Of course I can include ObjC code in the CFBundle, but I was speaking
>
about a true Cocoa plugin interface, with a principal class, some
>
protocol declared to communicate with the plugin manager and so on.
I think this 'of course' should actually be a 'it depends'.
Namely, it depends on whether the (Carbon) host application is ever going to
unload your ObjC based plug-in. If it does so, then your plug-in will blow
up the app because the ObjC runtime system doesn't support the unloading of
code and worse it actively installs a dyld callback which gets called as
soon as someone tries to unload one of your ObjC code segments. This
callback will then happily kill the host application. Note that it doesn't
matter whether you use the AppKit or Foundation kit, just a small class
derived from good old Object will suffice to get users very angry :)
This isn't an issue for Cocoa host applications because NSBundle doesn't
even offer API for unloading.
Regards,
Dietmar Planitzer
_______________________________________________
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.