hi to everybody,
I was studying the way to close an application from the method OnPreInit and I have written
a script to analyze the sequence of the calls to the throwing of the application.
The script, performed by the shell return this
bc@hal9000:~/Desktop$ python symple_app.py
class App(wx.App):
class MyFrame(wx.Frame):
no man’s land
if name == ‘main’:
OnPreInit(self):
wx.GetApp():<main.App; proxy of <Swig Object of type ‘wxPyApp *’ at 0x1a18110> >
OnPreInit return false
OnInit(self):
def init
super(MyFrame, self).init
p = wx.Panel(self)
self.frame = MyFrame(None, title=‘SympleApp’)
self.SetTopWindow(self.frame)
app = App(redirect = True)
the sequence of the calls allows me a bit perplexed ,
anyway,as I do to make to close the application, that has not not even started…
on OnPreInit method , that justly returns false but the thing doesn’t have some effect
I’ve attached a demo
regards
beppe
symple_app.py (1.34 KB)