hi all, I’m trying to use the custom gridcellchoiceeditor found in the wxpython wiki (wxpython cookbook section) in my application. The demo script on the wiki runs correctly but when I use the CustomCellChoiceEditor in my application, this crashes. Attached to this message you can find a script reproducing my problem (winVista, python25, wxpy2.8.10.1). Just try to change the value in cell (1,1) and you should get the error.
hi all, I'm trying to use the custom gridcellchoiceeditor found in the wxpython wiki (wxpython cookbook section) in my application. The demo script on the wiki runs correctly but when I use the CustomCellChoiceEditor in my application, this crashes. Attached to this message you can find a script reproducing my problem (winVista, python25, wxpy2.8.10.1). Just try to change the value in cell (1,1) and you should get the error.
You are creating a new editor in the table's GetAttr, and this editor has not had the _tc attribute set yet because Create() is not being called. So when the grid tries to hide the cell editor's control then it is using an uninitialized pointer and it is crashing. You should instead use the same instance of the cell editor that you created for this cell before. (Or just create one and reuse it.)