Re: [Pyobjc-dev] using PyObjCPointers (howto?)
Brought to you by:
ronaldoussoren
|
From: Ronald O. <ron...@ma...> - 2008-01-31 09:33:06
|
On 30 Jan, 2008, at 23:33, Scott Herzinger wrote: > I'm looking for an idiom by which I can use a given PyObjCPointer, > that I get back from some Cocoa API, as a Carbon object (or pointer > thereto). My specific requirement currently is to take a > PyObjCPointer that I get back from a QTKit API, and use its referent > as a Carbon.Qt.Media object. PyObjCPointer objects are an indication of an incomplete wrapping of a framework. Which method returns a PyObjCPointer and in which version of PyObjC? In PyObjC2 a PyObjCPointer has an "pointerAsInteger" atrribute that returns the numeric value of the pointer, I don't remember if PyObjC1 has the same attribute. With that value and ctypes you can contruct a Carbon.QT object. BTW. What OS release are you targetting? Apple is clearly stearing away from the Carbon QuickTime API's in favour of QTKit (no 64-bit support in the Carbon API, no new development as well). Ronald |