I'm writing a small program that was working ok until I added a function
that takes three listboxes, .Clear()s them, and then .Append()s several
strings. This function is called when the program starts up, and it works
fine there. Later in execution, however, it is called from an event
handler. I stepped through it with a debugger, and it terminates ok, and
the event handler terminates ok. Python then immediatley segfaults with
out going anywhere else. Does anybody know what could be causing this?
victor@flyingflame.net wrote:
I'm writing a small program that was working ok until I added a function
that takes three listboxes, .Clear()s them, and then .Append()s several
strings. This function is called when the program starts up, and it works
fine there. Later in execution, however, it is called from an event
handler. I stepped through it with a debugger, and it terminates ok, and
the event handler terminates ok. Python then immediatley segfaults with
out going anywhere else. Does anybody know what could be causing this?
Don't Clear and Append in the same handler. The native control needs to do some cleanup after the Clear first, so use wxCallAfter to call a function later to do the Appends.
ยทยทยท
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!