Multiple inheritance samples?

In the migration guide, there’s a clear warning:

"The SIP tool currently does not support having more than one wrapped C++ class as the base classes of a Python class. In most cases this is not a problem because in wxPython you’re more likely to use multiple inheritance with simple mix-in classes or similar constructs than needing to inherit from more than one wx class.

However there is at least one use case where that can be a problem, and that is with the ComboCtrl’s wx.ComboPopup class. In wxWidgets and also in Classic wxPython you’re encouraged to use wx.ComboPopup as a mix-in class combined with the widget class that is going to be your popup window for the wx.ComboCtrl. This can not currently be done with Phoenix in the same way, but you can also use a widget class with a wx.ComboPopup in a has-a relationship rather than an is-a relationship. See samples/combo/combo1.py for an example."

For the sake of helping out myself and other highly-motivated morons, I would really appreciate if someone could post a few samples demonstrating this issue where:

  1. The program worked in wxpython 2.8 but no longer works in 3 because of this issue
  2. Possible alternative

I really don’t know what to look for here, and I think having a contrast would be very helpful. The combo1.py sample works great, but I am not clear on why it shouldn’t.

Many Thanks, Eric

Compare the ListCtrlComboPopup class in the ComboCtrl sample in the demo for Classic (wxPython-Classic/demo/ComboCtrl.py at master · wxWidgets/wxPython-Classic · GitHub) with the same class name in Phoenix’s sample (
Phoenix/samples/combo/combo1.py at master · wxWidgets/Phoenix · GitHub)

I noticed the other day that there is a mention of a new feature in sip that may allow multiple inheritance to work again, at least in some cases. Investigating this is on my TODO list.

Robin

···

On Thursday, April 6, 2017 at 5:45:12 AM UTC-7, braidedlogix wrote:

In the migration guide, there’s a clear warning:

"The SIP tool currently does not support having more than one wrapped C++ class as the base classes of a Python class. In most cases this is not a problem because in wxPython you’re more likely to use multiple inheritance with simple mix-in classes or similar constructs than needing to inherit from more than one wx class.

However there is at least one use case where that can be a problem, and that is with the ComboCtrl’s wx.ComboPopup class. In wxWidgets and also in Classic wxPython you’re encouraged to use wx.ComboPopup as a mix-in class combined with the widget class that is going to be your popup window for the wx.ComboCtrl. This can not currently be done with Phoenix in the same way, but you can also use a widget class with a wx.ComboPopup in a has-a relationship rather than an is-a relationship. See samples/combo/combo1.py for an example."

For the sake of helping out myself and other highly-motivated morons, I would really appreciate if someone could post a few samples demonstrating this issue where:

  1. The program worked in wxpython 2.8 but no longer works in 3 because of this issue
  2. Possible alternative

I really don’t know what to look for here, and I think having a contrast would be very helpful. The combo1.py sample works great, but I am not clear on why it shouldn’t.

Many Thanks, Eric

Got it - will study thoroughly.

Many Thanks, Eric

It is too early to say if this actually the root problem of my ETS update woes, but after updating your old example directly, I get a segfault outcome. Even if multiple inheritance is not the exact cause, at least it gives me something to study directly (maybe shrink the size of my haystack a bit).

Again, many thanks for the assist.