Update of /cvsroot/wxlua/wxLua/modules/wxlua/include
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32640/wxLua/modules/wxlua/include
Modified Files:
wxlstate.h
Log Message:
- Added static bool wxLuaState::sm_wxAppMainLoop_will_run so that Lua code
that calls "wx.wxGetApp:MainLoop()" will not do anything. C++ coders
should call it if they create a wxLuaState and run Lua code from
their wxApp:OnInit() when wxApp:IsMainLoopRunning() returns false.
Added luamodule_mono to wxLua.dsw
Index: wxlstate.h
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v
retrieving revision 1.115
retrieving revision 1.116
diff -C2 -d -r1.115 -r1.116
*** wxlstate.h 15 Jan 2008 01:04:04 -0000 1.115
--- wxlstate.h 20 Jan 2008 19:23:01 -0000 1.116
***************
*** 755,758 ****
--- 755,773 ----
// -----------------------------------------------------------------------
+ // In order for wxLua scripts to work from a C++ program's wxApp::OnInit()
+ // and the Lua module you may have to set this variable to force the wxLua
+ // code "wx.wxGetApp:MainLoop()" to not call wxApp::MainLoop().
+ // The issue is that within the function wxApp::OnInit() wxApp::IsMainLoopRunning()
+ // returns false, but it will be running after OnInit() returns so we should
+ // silently ignore the Lua code wanting to prematurely start the MainLoop.
+ // Initialized to false, meaning not set.
+ // Set to true for the Lua code "wx.wxGetApp:MainLoop()" to not call
+ // the app's MainLoop() function.
+ //
+ // See the wxLua apps for usage.
+ static bool sm_wxAppMainLoop_will_run;
+
+ // -----------------------------------------------------------------------
+
// Get/Set the event handler that the wxLuaEvents from this will be sent to, can be NULL.
// See wxEVT_LUA_XXX for a list of possible events that may be sent.
|