Re: [Pyobjc-dev] Some PyObC tweaks for using EOF and custom frameworks
Brought to you by:
ronaldoussoren
From: Pierce T. W. I. <pi...@ma...> - 2003-08-13 18:12:59
|
>> So I removed by [obj self] call from pythonify_c_value, and I used >> this instead: >> >> >> objc.classAddMethods(EOFault,[Foundation.NSObject.__pyobjc_PythonObjec >> t__]) >> >> And that worked on single faults, but not array faults. > > Are array faults implemented directly via EOFault or is there some > other class to stand in for 'em? Pretty funny that you're asking ME, but yes, EOFault claims to be the object for both faults and containers. that works because EOFault is really just a wrapper object around EOFaultHandler or EOFArrayFaultHandler > >> I also got "None" for object.description() on a single fault. So it >> really only partially >> worked. > > Odd. > > Posing could completely hose this.... are you doing the > classAddMethods() immediately upon loading EOAccess [which defines > EOFault, IIRC]? It's EOControl actually, but yes. Yep. I think the EOFault hackery is too much for pyobjc. For one thing, on objC, you can call [obj description] and get [EOFault 0xASDFASDF], but from pyobjc, you still get a bus error. The other issue is possibly that pyobjc seems to be going into the low level of Objective-C to find out if methods are implemented and such. I would have expected it to be using respondsToSelector and such instead of messing with the isa pointer. Given that, it wouldn't surprise me if NSProxy and other "interface" objects might have problems. Pierce |