On 12/24/06, Jérôme VUARAND <[EMAIL PROTECTED]> wrote:
> 2006/12/24, Hakki Dogusan <[EMAIL PROTECTED]>:
> > Most of the samples designed for wxLua.exe.
> >
> > You may write a simple bootstrap file, ie:
> >
> >
> > wx = 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

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to