problem with wxPanel derivation class
Chris Mellon
arkanes at gmail.com
Thu Oct 11 17:01:54 EDT 2007
On 10/11/07, <"@bag.python.org <"none> wrote:
> wxGlade created a simple Frame with a panel a sizer and 3 wxControls ,
> saticText, TextCtrl, and a Button.
>
<snip>
> It seems as though the complaint is that a 'wxWindow *' is expected,
> 'Panel' is received
> However, Panel IS a wx.Panel derivative which IS a wx.Window derivative!
> Additionally, the methods in the code of Panel and MyFrameOne seem to be
> identical.
> I can't understand this. Anyone have any thoughts?
>
It's because you didn't call the base class __init__. wxPython is a
SWIG wrapper around the C++ wxWidgets library, and if you don't call
the base class the SWIG infrastructure that maps your class to an
underlying C++ class doesn't happen and you get this error.
More information about the Python-list
mailing list