Re: [Pyobjc-dev] VTK bindings
Brought to you by:
ronaldoussoren
From: b.bum <bb...@ma...> - 2003-12-02 15:23:55
|
On Dec 2, 2003, at 1:12 AM, Carlos Phillips wrote: > 2003-12-02 03:30:46.165 Simple1[1541] PyObjCPointer created: at > 0x6d16080 of type > {vtkRenderer={?={?={?=^^?i}C{vtkTimeStamp=^^? > L}^{vtkSubjectHelper}}^{vtkAssemblyPath}^{vtkPropCollection}iIff^{vtkPr > opCollection}^{vtkActor2DCollection}^{vtkWindow}[3f][4f][2f][2f][2f][2i > ][2i][3f][3f][4f]}^{vtkCamera}^{vtkLight}^{vtkLightCollection}^{vtkCull > erCollection}^{vtkActorCollection}^{vtkVolumeCollection}[3f]^{vtkRender > Window}ffiii*{vtkTimeStamp=^^? > L}fii^^{vtkProp}i^^{vtkAssemblyPath}iii[6f]f}8@0:4 Like Bob said, once a PyObjCPointer is created, you are generally out of luck. PyObjC transparently bridged Objective-C. In this case, you are asking it to transparently bridge a relatively complex C data type. Having had a look at the article, I see three methods like this.... -(vtkRenderer *)renderer; -(vtkRenderWindow *)renderWindow; -(vtkRenderWindowInteractor *)renderWindowInteractor; ... invoking the first would cause the above message to be produced. The problem is that you are passing a C structure reference across the bridge into the Python world. This is an edge case that is generally hard to handle. One solution would be to create a class for each c structure. Then, implement a method that returns an instance of the class that contains the structure. Each class would have instance methods that would get/set the data found within the C structure-- the vtkRenderer *, for example. b.bum |