That inheritance hierarchy only exists in C++. In the Python wrapper
wxPython, it's a bit more convoluted. Use the source Luke! There
is not so much other documentation I'm afraid.
class wxSizer(wxSizerPtr):
class wxBoxSizerPtr(wxSizerPtr):
class wxBoxSizer(wxBoxSizerPtr):
isinstance(sizer, wxSizerPtr) should do what you want I guess...
···
At 13:23 2002-11-27 -0500, you wrote:
I thought isinstance() was supposed to 'do the right thing' for derived classes...
>
>> I thought isinstance() was supposed to 'do the right thing' for
>> derived classes...
>
> That inheritance hierarchy only exists in C++. In the Python wrapper
> wxPython, it's a bit more convoluted. Use the source Luke! There
> is not so much other documentation I'm afraid.
>
> class wxSizer(wxSizerPtr):
>
> class wxBoxSizerPtr(wxSizerPtr):
>
> class wxBoxSizer(wxBoxSizerPtr):
>
> isinstance(sizer, wxSizerPtr) should do what you want I guess...
>
I thought isinstance() was supposed to 'do the right thing' for derived classes...
That inheritance hierarchy only exists in C++. In the Python wrapper
wxPython, it's a bit more convoluted. Use the source Luke! There
is not so much other documentation I'm afraid.
class wxSizer(wxSizerPtr):
class wxBoxSizerPtr(wxSizerPtr):
class wxBoxSizer(wxBoxSizerPtr):
isinstance(sizer, wxSizerPtr) should do what you want I guess...
This would be better:
isinstance(b, (wxSizer, wxSizerPtr))
just in case I ever "fix" the code generator to use a more consistent (and sane) class heriarchy.
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!