I'm working on writing a very simple client/server application as an excuse to start learning network/gui programming in python. At the moment I'm stuck on transitioning from my login frame to the main frame of the application.
The login frame is a subclass of wx.Frame, and basically I just want to close it and open the main frame when it receives confirmation from the server:
def handleServerSignon(self, msg):
if msg.getCode() == net.message.HANDLE_IN_USE:
self.status.SetStatusText('Handle already in use')
elif msg.getCode() == net.message.SIGNON_SUCCESSFUL:
self.Close()
mainWindow = wx.Frame(None, wx.ID_ANY, 'main window', wx.DefaultPosition, \
(640, 480))
mainWindow.Show(True)
I can't even get this to give a consistent error message though... sometimes it works, sometimes it crashes with the following:
python: ../../src/xcb_io.c:242: process_responses: Assertion `(((long) (dpy->last_request_read) - (long) (dpy->request)) <= 0)' failed.
Any help is very much appreciated!
Walker