2006/12/24, John Labenski <[EMAIL PROTECTED]>: > On 12/24/06, Jérôme VUARAND <[EMAIL PROTECTED]> wrote: > > 2006/12/24, John Labenski <[EMAIL PROTECTED]>: > > > 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. > > > > wxApp::Pending+wxApp::Dispatch seems to be exactly what I need. > > You may still want to consider using wxEVT_IDLE though since I think > that's what is typically suggested on the C++ wxusers mailing list for > doing pseudo-threading like this.
I've tried Pending+Dispatch but that don't seems to work. wx.wxGetApp():Pending() never returns true. The code is : wx = require("wx") dofile(...) local use_custom_loop = true if use_custom_loop then while true do if wx.wxGetApp():Pending() then wx.wxGetApp():Dispatch() end end else wx.wxGetApp():MainLoop() end The command line is : lua bootstrap.lua minimal.wx.lua Everything works ok if I set my use_custom_loop to false. I'll have a look at the internals of MainLoop to see what may be missing. And I still need to try the idle event model, though I don't think that will match my timing requirement. ------------------------------------------------------------------------- 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