Tutorial example hangs

Janos Blazi wrote:

I copied the wxPython tutorial example (chapter Events in wxPython) from HTML and tried to run it. The window is displayed correctly as far as I can tell, but I get the famous message that wxPython.exe has detected an error and has to be terminated. I am asked if I want to send a report to Microsoft.

I use XP and Python 2.3 (and wxPython for Python 2.3, the ASCII version).

Can anybody help me?

Please show us the code you are trying to run.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Here you are:

from wxPython.wx import *
ID_ABOUT = 101
ID_EXIT = 102
class MyFrame(wxFrame):
    def __init__(self, parent, ID, title):
        wxFrame.__init__(self, parent, ID, title,
                         wxDefaultPosition, wxSize(200, 150))
        self.CreateStatusBar()
        self.SetStatusText("This is the statusbar")
        menu = wxMenu()
        menu.Append(ID_ABOUT, "&About",
                    "More information about this program")
        menu.AppendSeparator()
        menu.Append(ID_EXIT, "E&xit", "Terminate the program")
        menuBar = wxMenuBar()
        menuBar.Append(menu, "&File");
        self.SetMenuBar(menuBar)
        EVT_MENU(self, ID_ABOUT, self.OnAbout)
        EVT_MENU(self, ID_EXIT, self.TimeToQuit)
    def OnAbout(self, event):
        dlg = wxMessageDialog(self, "This sample program shows off\n"
                              "frames, menus, statusbars, and this\n"
                              "message dialog.",
                              "About Me", wxOK | wxICON_INFORMATION)
        dlg.ShowModal()
        dlg.Destroy()
    def TimeToQuit(self, event):
        self.Close(true)
class MyApp(wxApp):
    def OnInit(self):
        frame = MyFrame(NULL, -1, "Hello from wxPython")
        frame.Show(true)
        self.SetTopWindow(frame)
        return true
app = MyApp(0)
app.MainLoop()

···

Am Tue, 09 Sep 2003 18:37:28 -0700 hat Robin Dunn <robin@alldunn.com> geschrieben:

Janos Blazi wrote:

I copied the wxPython tutorial example (chapter Events in wxPython) from HTML and tried to run it. The window is displayed correctly as far as I can tell, but I get the famous message that wxPython.exe has detected an error and has to be terminated. I am asked if I want to send a report to Microsoft.

I use XP and Python 2.3 (and wxPython for Python 2.3, the ASCII version) .

Can anybody help me?

Please show us the code you are trying to run.

--
JB

Janos Blazi wrote:

···

Am Tue, 09 Sep 2003 18:37:28 -0700 hat Robin Dunn <robin@alldunn.com> > geschrieben:

Janos Blazi wrote:

I copied the wxPython tutorial example (chapter Events in wxPython) from HTML and tried to run it. The window is displayed correctly as far as I can tell, but I get the famous message that wxPython.exe has detected an error and has to be terminated. I am asked if I want to send a report to Microsoft.

I use XP and Python 2.3 (and wxPython for Python 2.3, the ASCII version) .

Can anybody help me?

Please show us the code you are trying to run.

Here you are:

It works fine here. Are you using wxPython 2.4.1.2?

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

It works fine here. Are you using wxPython 2.4.1.2?

Yes, I am. Are you using XP+SP1?

···

--
JB

I have been told by Tim R. that this is a known "problem".

···

--
JB

Janos Blazi wrote:

I have been told by Tim R. that this is a known "problem".

What is?

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

You cannot run a wxPython application from within the Python IDLE.

···

Am Thu, 11 Sep 2003 11:35:25 -0700 hat Robin Dunn <robin@alldunn.com> geschrieben:

Janos Blazi wrote:

I have been told by Tim R. that this is a known "problem".

What is?

--
JB