2.7 Problems: Strange Solution

Marcio Moreira arqeco at yahoo.com.br
Sat Oct 28 07:47:43 PDT 2006


Hello friends,

First of all, I am sorry about the double posting, but I didn't any receive messages (but I can send to) from this list since October 21. So, it was just when I checked the wxpython site list archive that I saw your answers.

Well, It's a strange world we live on. As I've told you, after upgrade to wxPython 2.7 every time I closed my app I got errors like "invalid instruction", "bus error", etc.

Below is the code I used to make the GUI run on my app:

projetotela = TelaApp(0)
GUI = projetotela.frame_principal
projetotela.MainLoop()

Following a python debugger tutorial to check my problem, I have changed this code to the following, so I could run it from a python console on a debugging session:

def app_start():
    projetotela = TelaApp(0)
    GUI = projetotela.frame_principal
    projetotela.MainLoop()

app_start()

And it just worked! No debugging needed. Just put this GUI starting code on a function, called the function, and I had no more error messages when closing my app.

Any hint why this happened? I am very curious about it...

By the way, one friend suggested replacing:

self.Destroy()

by

self.Hide()
wxCallAfter(self.Destroy)

It didn't helped. But now that I discovered the strange workaround of putting GUI starting code on a function, both ending solutions works (destroy and callafter). Anyway, thank you very much.

I am very happy for my choice of Python and wxPython. It's a very strong community we have here.

Best Regards,
Márcio Moreira


 		
---------------------------------
 O Yahoo! está de cara nova. Venha conferir!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/20061028/ae103673/attachment.htm


More information about the wxpython-users mailing list