| 
      
      
      From: John L. <jla...@gm...> - 2006-12-25 00:16:36
      
     | 
| On 12/24/06, J=E9r=F4me VUARAND <jer...@gm...> wrote:
> 2006/12/24, Hakki Dogusan <dog...@tr...>:
> > Most of the samples designed for wxLua.exe.
> >
> > You may write a simple bootstrap file, ie:
> >
> >
> > wx =3D require("wx")
> > dofile("wxluasudoku.wx.lua")
> > wx.wxGetApp():MainLoop()
>
> Is there an equivalent of wx.wxGetApp():MainLoop() that is not
> blocking ? It would process all pending messages, and then give back
> control to application. I would then call it from my own frame-based
> main loop.
You have to do all initialization or whatever you need to do before
running the GUI main loop which is always blocking since thats what
the underlying framework does. You can use the wxEVT_IDLE events to do
things continuously by calling event.RequestMore(true), but note that
continuously doing this will use 100% of your processor.
What you're suggesting is not normal, it's better to have the system's
native mainloop control program flow rather than implementing your own
which will most likely be far less efficient. In any case you should
be able to do it using wxApp::Pending and wxApp::Dispatch.
Hope this helps,
    John Labenski
 |