From: Stefano M. <mwi...@gm...> - 2010-07-20 15:13:19
|
Thanks Stef On 07/20/2010 03:50 PM, Stef Mientki wrote: > On 20-07-2010 13:39, Stefano Mtangoo wrote: > >> seems like I'm missing something. >> Could you give an example on how you override that? >> > class My_App ( wx.App ) : > > def MainLoop(self): > # take over the event loop, but save the old one > self.My_EventLoop = wx.EventLoop () > old = wx.EventLoop.GetActive () > wx.EventLoop.SetActive ( self.My_EventLoop ) > > while PG.App_Running : > > do what ever you like here, e.g. do a step of VPython > > while self.My_EventLoop.Pending(): > self.My_EventLoop.Dispatch() > self.ProcessIdle() > > # normally 50 fps > ddT = Application.VM_Delay - ( time.time() - Loop_Time ) > if ddT> 0 : > time.sleep ( ddT ) > Loop_Time = time.time() > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |