[Pyobjc-dev] Mixed PyObjC code with a Custom View in ObjC
Brought to you by:
ronaldoussoren
From: Scott H. <sco...@gm...> - 2005-12-22 04:47:57
|
I'm trying to use the visualization toolkit (http:// public.kitware.com/VTK/) with PyObjC in a Cocoa app and I'm new to Cocoa and PyObjC, so I'm a bit baffled about where to start. Most of the work I've done in the past is with wxPython. Here's the basic scenario: I've got a simple ObjC program that uses a custom view for VTK to render into. The custom view is pretty simple and it just hooks a few VTK classes up and initializes some things. The VTK library is wrapped in python so it's easy to write a python script that opens a Cocoa window and displays a visualization. I thought I could just re-implement the custom view in PyObjC, but the custom view subclasses a class called vtkCocoaGLView. This class isn't in the python wrappers for VTK. Bummer. So what's the easiest way to use a custom view written in ObjC from a PyObjC program? Do I subclass it in Python or maybe load it as a plugin in a mixed PyObjC/ObjC app? Any ideas or a push in the right direction would be great. Thanks, -Scott |