On Jan 1, 2005, at 9:29 PM, Dethe Elza wrote:

I have a couple of questions about pyobjc 1.2. First, can Categories extend classes which are defined in Python?

Only if they are a subclass of an Objective-C class.

Second, what applications can be extended with plugins? I realize a complete list is unfeasible, but which Apple applications would be a good start. As far as I can tell, Safari requires Netscape-style plugins to extend it, is that wrong?

Any application that expects its plugins to be written in Objective-C is fair game, anything else (such as Safari's Netscape-style plugins) is unsupported and probably won't work.


The reason for this is that applications that expect plugins to be written in C or C++ are probably going to expect that particular symbols are defined in the plugin, and that is basically impossible to do at runtime and would require some custom compiled C/C++ stub. Objective-C is dynamic enough that this may be done at runtime using a dyld bundle loader hook to define the class while the application is trying to look it up.

It is theoretically possible to make this work without requiring a custom stub (b/c macholib could rewrite the symbol table), but I'm not going to write such a monstrosity any time soon unless someone is willing to pay me a lot to do it. I simply just don't have a need for it, and if I did, I would likely just write a custom C/C++ stub.

-bob

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to