Hi list,
after some tries, I see that the wxPython classes don't call its parents
(or child?) with the standard inheritance method (super). Is there a
solution for this or this is an "internal" wxWidgets/wxPython problem?
Hi list,
after some tries, I see that the wxPython classes don't call its parents
(or child?) with the standard inheritance method (super). Is there a
solution for this or this is an "internal" wxWidgets/wxPython problem?
wxPython classes are not 'cooperative', as it is called. In addition to Keith's suggestion (calling Superclass.__init__ explicitly) you can also reorder the base classes so that your own classes' methods are invoked first, like this:
Hi list,
after some tries, I see that the wxPython classes don't call its parents
(or child?) with the standard inheritance method (super).
Because they invoke the C++ class constructor that knows nothing about the Python classes. The Python proxy class hierarchy is pretty much a mirror of the C++ hierarchy, but the real instances and the real hierarchy is still on the C++ side.
Is there a
solution for this or this is an "internal" wxWidgets/wxPython problem?
Hi list, after some tries, I see that the wxPython classes don't
call its parents (or child?) with the standard inheritance method
(super). Is there a solution for this or this is an "internal"
wxWidgets/wxPython problem?
wxPython classes are not 'cooperative', as it is called. In addition
to Keith's suggestion (calling Superclass.__init__ explicitly) you
can also reorder the base classes so that your own classes' methods
are invoked first, like this: