Re: [Pyobjc-dev] How to use NSOpenGLContext.setValues_forParameter_ with PyObjC <= 2.2?
Brought to you by:
ronaldoussoren
From: Ronald O. <ron...@ma...> - 2011-02-08 13:40:29
|
On 6 Feb, 2011, at 11:26, Phillip Nguyen wrote: > > Hi, > > I'm writing code for Snow Leopard that I would like to support the default installed version of PyObjC. I'm calling NSOpenGLContext.setValues_forParameter_() which takes as its first argument a pointer to an int (or array of ints). It seems to work fine in PyObjC 2.3, but in PyObjC 2.2b3 I get > > ValueError: depythonifying 'pointer', got 'int' > > I don't know enough about PyObjC to figure out how to supply the 'pointer' that it wants. Currently I am using a horrible hack involving ctypes: That's probably the easiest way to do this in 2.2b3, I've fisxed a number of bugs in the wrappes in later versions and this is one of them. The fix involved changed to C code and is hence not easily reproduced in scripts. Ronald |