[wxPython-users] "thisown" attribute error?

Chris Mellon arkanes at gmail.com
Mon Sep 24 11:42:50 PDT 2007


On 9/24/07, Abe Stephens <abe at sci.utah.edu> wrote:
> Hi, I am attempting to write a wxPython/OSG application but I'm having
> difficulty with classes that must inherit from both packages. Following
> an OSG C++ example I define a class below:
>
> class CallbackGLCanvas(wxGLCanvas,osgViewer.GraphicsWindow):
>   def __init__(self,
> parent,renderables,attribList=[GL_DOUBLEBUFFER,0],size=wx.Size(-1,-1)):
>         wxGLCanvas.__init__(self, parent,
> -1,attribList=attribList,style=wx.NO_BORDER,size=size)
>         # ...
>

I'm not sure that multiple inheriting from two different SWIG
generated classes is at all supported. If it is, you're certainly
going to need to call both base class constructors (you're only
calling the wxGLCanvas one). I would suggest that you use composition
instead of MI for this.




More information about the wxpython-users mailing list