From: Kevin A. <ka...@us...> - 2004-09-25 03:19:53
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2955 Modified Files: model.py Log Message: changed on_initialize to just use wx.CallAfter Index: model.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/model.py,v retrieving revision 1.187 retrieving revision 1.188 diff -C2 -d -r1.187 -r1.188 *** model.py 24 Sep 2004 22:51:58 -0000 1.187 --- model.py 25 Sep 2004 03:19:23 -0000 1.188 *************** *** 626,629 **** --- 626,641 ---- aBgRsrc.name) + # KEA 2004-09-24 + # experiment to see if initialize event will + # fire before all other events + # also see change to wx.CallAfter in textfield, passwordfield, and textarea + evt = wx.PyEvent() + # this is sort of pointless, the target is always self + # do any samples or tool refer to the target? + evt.target = self + wx.CallAfter(self.on_initialize, evt) + # also changing how other background events are hooked up + wx.CallAfter(self.OnLatentBackgroundBind, None) + self._initLayout(aBgRsrc.components) *************** *** 657,674 **** # Post the Background initialization event. ! self.EVT_OPEN_BACKGROUND_TYPE = wx.NewEventType() ! self.id = wx.NewId() ! self.Connect(self.GetId(), -1, ! self.EVT_OPEN_BACKGROUND_TYPE, ! self.on_initialize) ! #self._dispatchOpenBackground ) ! evt = wx.PyCommandEvent(self.EVT_OPEN_BACKGROUND_TYPE, self.GetId()) ! evt.target = self ! wx.PostEvent(self, evt) ! EVT_LATENT_BACKGROUNDBIND(self, self.OnLatentBackgroundBind) ! wx.PostEvent(self, wxLatentBackgroundBindEvent()) ! # for some reason the Message Watcher isn't a listener yet ! # so calling EventLog doesn't do anything ! #event.EventLog.getInstance().log('initialize', self.name, True) self._bindWindowEvents() --- 669,687 ---- # Post the Background initialization event. ! ## self.EVT_OPEN_BACKGROUND_TYPE = wx.NewEventType() ! ## self.id = wx.NewId() ! ## self.Connect(self.GetId(), -1, ! ## self.EVT_OPEN_BACKGROUND_TYPE, ! ## self.on_initialize) ! ## #self._dispatchOpenBackground ) ! ## evt = wx.PyCommandEvent(self.EVT_OPEN_BACKGROUND_TYPE, self.GetId()) ! ## evt.target = self ! ## wx.PostEvent(self, evt) ! ## EVT_LATENT_BACKGROUNDBIND(self, self.OnLatentBackgroundBind) ! ## wx.PostEvent(self, wxLatentBackgroundBindEvent()) ! ## # for some reason the Message Watcher isn't a listener yet ! ## # so calling EventLog doesn't do anything ! ## #event.EventLog.getInstance().log('initialize', self.name, True) ! self._bindWindowEvents() |