Re: [Pyobjc-dev] Re: interface builder queries
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2003-08-29 13:09:10
|
On Friday, 29 August 2003, at 14:10, Ronald Oussoren wrote: > > My current idea for a hack to implement this is to dynamicly replace > the 'isa' pointer of Python based bundles from that +load method. As > longs as IB uses [bundle classNamed:] we would get a working > situtation (although using an extremely ugly hack). > > that works al right. If you use the attached pluginbuilder.py and add the following code to init_objc in Modules/objc/module.m you can build a IB.palette that actually loads. I haven't checked if you can actually do anything in the plugin. /* Python based plugin bundles currently use only PyObjClass_GetClass, * add that seperately to avoid distributing pyobjc-api.h for now */ { PyObject* v = PyCObject_FromVoidPtr((void*)(PyObjCClass_GetClass), NULL); if (v == NULL) return; PyDict_SetItemString(d, "__C_GETCLASS__", v); } Warning: this is a hack and I don't know yet if I want to see this code anywhere near our repository. Ronald |