Hypertreelist with button crash

Hi,

I have a bug in a piece of code that creates a HyperTreeList with a button as an itemwindow in one of its rows. Clicking the button runs code that pops up a menu which allows the user to delete the row (and children) with that button. The code attached runs fine on Windows 7 but crashes with a segmentation fault on Linux (Ubuntu) and also on Mac OSX Maverick.

Would anyone have a suggestion or a solution to this problem?

Many thanks,

Rob

HyperTreeListMenuButtonBug.py (1.36 KB)

So it seems that the crash can be averted by replacing self.PopupMenu(popmenu) in the OnClicked method of the MenuButton class with self.parent.PopupMenu(popmenu). I guess this causes the frame to display the menu rather than the button.

I’m sure there are experts out there who can shed light on why this is critically important on other platforms than Windows.

···

On Tuesday, 10 February 2015 18:15:40 UTC, Robert Oeffner wrote:

Hi,

I have a bug in a piece of code that creates a HyperTreeList with a button as an itemwindow in one of its rows. Clicking the button runs code that pops up a menu which allows the user to delete the row (and children) with that button. The code attached runs fine on Windows 7 but crashes with a segmentation fault on Linux (Ubuntu) and also on Mac OSX Maverick.

Would anyone have a suggestion or a solution to this problem?

Many thanks,

Rob