From: Chris B. <Chr...@no...> - 2005-04-10 05:29:07
|
>> (XP), I see that lines 116-117 are commented. These lines are: >> >> # wxapp = wxPySimpleApp() >> # wxapp.SetExitOnFrameDelete(True) The wxApp should NOT be created here! However, if there seems to be a reason that it has to be, perhaps these lines could be surrounded by a check to see if there is already a wxApp running. Robin, is there a call to do that? Maybe: if not wxGetApp(): wxapp = wxPySimpleApp() wxapp.SetExitOnFrameDelete(True) I just tested this quickly, and wxGetApp() returns None before app creation, and a wxApp instance after, which returns True, so it should work. For that matter, maybe wx.PySimpleApp() should check itself, and never create a duplicate app. By the way, it really should be: import wx wx.PySimpleApp() etc. Maybe I'll get around to cleaning up that code some day! -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |