I’m using wxPython 2.8.9.2-1, python 2.6, on an Arch Linux.
The background:
I’m trying to create a small app that sits on the bottom of the screen, occupying the whole display width. This big bar is divided in (and composed by) one or more slightly modified TextCtrls, each one fitting it’s own text and the last one expading to the end. So it looks like this:
GUITest.py (3.48 KB)
···
text here | some other text here | finally some more |
Initially there’s only one entry, but every time the user presses “TAB”, the last widget fits it’s text and a new one is created. And for each “ESC” pressed, the last widget is destroyed.
blah | --press tab–> | blah | new! | --press esc–> | blah |
The problem:
The code is a bit confusing, but it’s mostly working. The problem arrives when the user deletes an entry by pressing ESC: it generates a simple, silent crash.
When the “argument.Destroy()” method is called by the user, at the end of the code everything disappears and just a “Exit code: 0 Signal: 11” lasts. But if the building code calls this function, everything goes smooth.
I have tried removing any events linked to this object and detatching it from the sizer, but nothing changes.
The shrinked code is attached.
Sorry for the confusing descriptions, but I can’t understand it myself. What is happening?