Update of /cvsroot/wxlua/wxLua/samples In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9444/wxLua/samples Modified Files: auidemo.wx.lua bindings.wx.lua calculator.wx.lua choices.wx.lua controls.wx.lua coroutine.wx.lua dialog.wx.lua editor.wx.lua grid.wx.lua htmlwin.wx.lua luamodule.wx.lua mdi.wx.lua media.wx.lua minimal.wx.lua picker.wx.lua printing.wx.lua scribble.wx.lua settings.wx.lua sizer.wx.lua tree.wx.lua unittest.wx.lua validator.wx.lua veryminimal.wx.lua wxluasudoku.wx.lua Log Message: Add require("wx") and wx.wxGetApp():MainLoop() to the samples so they work with the wxLua module. Index: validator.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/validator.wx.lua,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** validator.wx.lua 22 Jul 2007 04:38:31 -0000 1.5 --- validator.wx.lua 22 Jan 2008 04:45:39 -0000 1.6 *************** *** 10,13 **** --- 10,17 ---- ----------------------------------------------------------------------------- + -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit + package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" + require("wx") + -- NOTES about validators! -- The controls apparently must be in a wxDialog and they must also *************** *** 185,186 **** --- 189,196 ---- main() + + -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, + -- otherwise the wxLua program will exit immediately. + -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the + -- MainLoop is already running or will be started by the C++ program. + wx.wxGetApp():MainLoop() Index: dialog.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/dialog.wx.lua,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** dialog.wx.lua 22 Jul 2007 04:38:30 -0000 1.14 --- dialog.wx.lua 22 Jan 2008 04:45:39 -0000 1.15 *************** *** 9,12 **** --- 9,16 ---- -------------------------------------------------------------------------=--- + -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit + package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" + require("wx") + -- IDs of the controls in the dialog ID_CELSIUS_BUTTON = 1 -- NOTE: We use the fact that the textctrl ids *************** *** 205,206 **** --- 209,216 ---- -- Show the dialog dialog:Show(true) + + -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, + -- otherwise the wxLua program will exit immediately. + -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the + -- MainLoop is already running or will be started by the C++ program. + wx.wxGetApp():MainLoop() Index: unittest.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/unittest.wx.lua,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** unittest.wx.lua 22 Dec 2007 06:07:17 -0000 1.20 --- unittest.wx.lua 22 Jan 2008 04:45:39 -0000 1.21 *************** *** 11,14 **** --- 11,18 ---- ----------------------------------------------------------------------------- + -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit + package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" + require("wx") + tests_run = 0 failed_tests = 0 *************** *** 351,352 **** --- 355,362 ---- print("Tests that failed : "..tostring(failed_tests)) print("Warnings : "..tostring(warnings).."\n") + + -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, + -- otherwise the wxLua program will exit immediately. + -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the + -- MainLoop is already running or will be started by the C++ program. + --wx.wxGetApp():MainLoop() Index: printing.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/printing.wx.lua,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** printing.wx.lua 16 Jul 2007 19:35:31 -0000 1.17 --- printing.wx.lua 22 Jan 2008 04:45:39 -0000 1.18 *************** *** 11,14 **** --- 11,18 ---- ----------------------------------------------------------------------------- + -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit + package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" + require("wx") + local ID_PRINT = wx.wxID_HIGHEST + 1 local ID_PRINTPREVIEW = wx.wxID_HIGHEST + 2 *************** *** 289,290 **** --- 293,300 ---- main() + + -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, + -- otherwise the wxLua program will exit immediately. + -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the + -- MainLoop is already running or will be started by the C++ program. + wx.wxGetApp():MainLoop() Index: scribble.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/scribble.wx.lua,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** scribble.wx.lua 4 Jan 2008 05:36:07 -0000 1.24 --- scribble.wx.lua 22 Jan 2008 04:45:39 -0000 1.25 *************** *** 11,14 **** --- 11,18 ---- -------------------------------------------------------------------------=--- + -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit + package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" + require("wx") + frame = nil -- the main wxFrame scrollwin = nil -- the child of the frame *************** *** 694,695 **** --- 698,705 ---- main() + + -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, + -- otherwise the wxLua program will exit immediately. + -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the + -- MainLoop is already running or will be started by the C++ program. + wx.wxGetApp():MainLoop() Index: bindings.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/bindings.wx.lua,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** bindings.wx.lua 17 Jan 2008 05:32:05 -0000 1.20 --- bindings.wx.lua 22 Jan 2008 04:45:39 -0000 1.21 *************** *** 10,13 **** --- 10,17 ---- ----------------------------------------------------------------------------- + -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit + package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" + require("wx") + -- ---------------------------------------------------------------------------- -- ---------------------------------------------------------------------------- *************** *** 1318,1319 **** --- 1322,1329 ---- main() + + -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, + -- otherwise the wxLua program will exit immediately. + -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the + -- MainLoop is already running or will be started by the C++ program. + wx.wxGetApp():MainLoop() Index: choices.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/choices.wx.lua,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** choices.wx.lua 5 Jun 2007 21:07:26 -0000 1.12 --- choices.wx.lua 22 Jan 2008 04:45:39 -0000 1.13 *************** *** 8,11 **** --- 8,15 ---- -------------------------------------------------------------------------=--- + -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit + package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" + require("wx") + frame = nil *************** *** 58,63 **** wx.wxDefaultPosition, wx.wxDefaultSize, choices) ! -- Test the binding generator to properly overload ! -- wxComboBox::SetSelection(int from, int to) (to mark text) and -- wxControlWithItems::SetSelection(int sel) comboBox:SetSelection(2) --- 62,67 ---- wx.wxDefaultPosition, wx.wxDefaultSize, choices) ! -- Test the binding generator to properly overload ! -- wxComboBox::SetSelection(int from, int to) (to mark text) and -- wxControlWithItems::SetSelection(int sel) comboBox:SetSelection(2) *************** *** 107,108 **** --- 111,118 ---- main() + + -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, + -- otherwise the wxLua program will exit immediately. + -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the + -- MainLoop is already running or will be started by the C++ program. + wx.wxGetApp():MainLoop() Index: minimal.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/minimal.wx.lua,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** minimal.wx.lua 16 Jul 2007 19:35:31 -0000 1.10 --- minimal.wx.lua 22 Jan 2008 04:45:39 -0000 1.11 *************** *** 10,13 **** --- 10,17 ---- ----------------------------------------------------------------------------- + -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit + package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" + require("wx") + frame = nil *************** *** 85,86 **** --- 89,96 ---- main() + + -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, + -- otherwise the wxLua program will exit immediately. + -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the + -- MainLoop is already running or will be started by the C++ program. + wx.wxGetApp():MainLoop() Index: tree.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/tree.wx.lua,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** tree.wx.lua 16 Jul 2007 19:35:32 -0000 1.11 --- tree.wx.lua 22 Jan 2008 04:45:39 -0000 1.12 *************** *** 10,13 **** --- 10,17 ---- ----------------------------------------------------------------------------- + -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit + package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" + require("wx") + -- create a nice string using the wxTreeItemId and our table of "data" function CreateLogString(treeitem_id) *************** *** 124,127 **** main() ! ! --- 128,134 ---- main() ! -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, ! -- otherwise the wxLua program will exit immediately. ! -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the ! -- MainLoop is already running or will be started by the C++ program. ! wx.wxGetApp():MainLoop() Index: coroutine.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/coroutine.wx.lua,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** coroutine.wx.lua 16 Jul 2007 19:35:31 -0000 1.7 --- coroutine.wx.lua 22 Jan 2008 04:45:39 -0000 1.8 *************** *** 8,11 **** --- 8,15 ---- -------------------------------------------------------------------------=--- + -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit + package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" + require("wx") + ------------------------------------------------------------------------------- -- ProgressWindow *************** *** 149,150 **** --- 153,160 ---- -- Show the main frame frame:Show(true) + + -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, + -- otherwise the wxLua program will exit immediately. + -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the + -- MainLoop is already running or will be started by the C++ program. + wx.wxGetApp():MainLoop() Index: media.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/media.wx.lua,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** media.wx.lua 16 Jul 2007 19:35:31 -0000 1.3 --- media.wx.lua 22 Jan 2008 04:45:39 -0000 1.4 *************** *** 10,13 **** --- 10,17 ---- ----------------------------------------------------------------------------- + -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit + package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" + require("wx") + frame = nil -- main wxFrame mediaCtrl = nil -- wxMediaCtrl player *************** *** 300,301 **** --- 304,311 ---- main() + + -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, + -- otherwise the wxLua program will exit immediately. + -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the + -- MainLoop is already running or will be started by the C++ program. + wx.wxGetApp():MainLoop() Index: picker.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/picker.wx.lua,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** picker.wx.lua 16 Jul 2007 19:35:31 -0000 1.2 --- picker.wx.lua 22 Jan 2008 04:45:39 -0000 1.3 *************** *** 10,13 **** --- 10,17 ---- ----------------------------------------------------------------------------- + -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit + package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" + require("wx") + frame = nil textCtrl = nil *************** *** 385,386 **** --- 389,396 ---- main() + + -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, + -- otherwise the wxLua program will exit immediately. + -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the + -- MainLoop is already running or will be started by the C++ program. + wx.wxGetApp():MainLoop() Index: sizer.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/sizer.wx.lua,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** sizer.wx.lua 31 May 2007 17:18:56 -0000 1.7 --- sizer.wx.lua 22 Jan 2008 04:45:39 -0000 1.8 *************** *** 9,12 **** --- 9,16 ---- ----------------------------------------------------------------------------- + -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit + package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" + require("wx") + frame = wx.wxFrame(wx.NULL, wx.wxID_ANY, "wxLua sizer test frame") *************** *** 33,34 **** --- 37,44 ---- wx.wxGetApp():SetTopWindow(frame) frame:Show(true) + + -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, + -- otherwise the wxLua program will exit immediately. + -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the + -- MainLoop is already running or will be started by the C++ program. + wx.wxGetApp():MainLoop() Index: wxluasudoku.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/wxluasudoku.wx.lua,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** wxluasudoku.wx.lua 5 Dec 2007 05:54:11 -0000 1.76 --- wxluasudoku.wx.lua 22 Jan 2008 04:45:39 -0000 1.77 *************** *** 8,11 **** --- 8,15 ---- -------------------------------------------------------------------------=--- + -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit + package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" + require("wx") + -- Coding notes: -- All non gui sudoku functions are in the "sudoku" table and all gui related *************** *** 5200,5201 **** --- 5204,5211 ---- end ]] + + -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, + -- otherwise the wxLua program will exit immediately. + -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the + -- MainLoop is already running or will be started by the C++ program. + wx.wxGetApp():MainLoop() Index: htmlwin.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/htmlwin.wx.lua,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** htmlwin.wx.lua 16 Jul 2007 19:35:31 -0000 1.14 --- htmlwin.wx.lua 22 Jan 2008 04:45:39 -0000 1.15 *************** *** 8,11 **** --- 8,15 ---- -------------------------------------------------------------------------=--- + -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit + package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" + require("wx") + frame = nil -- the main frame of the program html = nil -- the wxLuaHtmlWindow child of the frame (subclassed wxHtmlWindow) *************** *** 162,163 **** --- 166,173 ---- wx.wxGetApp().TopWindow = frame frame:Show(true) + + -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, + -- otherwise the wxLua program will exit immediately. + -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the + -- MainLoop is already running or will be started by the C++ program. + wx.wxGetApp():MainLoop() Index: editor.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/editor.wx.lua,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** editor.wx.lua 16 Jul 2007 19:35:31 -0000 1.56 --- editor.wx.lua 22 Jan 2008 04:45:39 -0000 1.57 *************** *** 8,11 **** --- 8,15 ---- -------------------------------------------------------------------------=--- + -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit + package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" + require("wx") + -- Equivalent to C's "cond ? a : b", all terms will be evaluated function iff(cond, a, b) if cond then return a else return b end end *************** *** 2371,2372 **** --- 2375,2382 ---- --frame:SetIcon(wxLuaEditorIcon) --FIXME add this back frame:Show(true) + + -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, + -- otherwise the wxLua program will exit immediately. + -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the + -- MainLoop is already running or will be started by the C++ program. + wx.wxGetApp():MainLoop() Index: settings.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/settings.wx.lua,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** settings.wx.lua 16 Jul 2007 19:35:32 -0000 1.4 --- settings.wx.lua 22 Jan 2008 04:45:39 -0000 1.5 *************** *** 10,13 **** --- 10,17 ---- ----------------------------------------------------------------------------- + -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit + package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" + require("wx") + frame = nil listCtrl = nil *************** *** 295,296 **** --- 299,306 ---- main() + + -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, + -- otherwise the wxLua program will exit immediately. + -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the + -- MainLoop is already running or will be started by the C++ program. + wx.wxGetApp():MainLoop() Index: controls.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/controls.wx.lua,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** controls.wx.lua 8 Jan 2008 00:55:36 -0000 1.15 --- controls.wx.lua 22 Jan 2008 04:45:39 -0000 1.16 *************** *** 10,13 **** --- 10,17 ---- ----------------------------------------------------------------------------- + -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit + package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" + require("wx") + frame = nil textCtrl = nil *************** *** 1108,1109 **** --- 1112,1119 ---- main() + + -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, + -- otherwise the wxLua program will exit immediately. + -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the + -- MainLoop is already running or will be started by the C++ program. + wx.wxGetApp():MainLoop() Index: mdi.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/mdi.wx.lua,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** mdi.wx.lua 16 Jul 2007 19:35:31 -0000 1.14 --- mdi.wx.lua 22 Jan 2008 04:45:39 -0000 1.15 *************** *** 9,12 **** --- 9,17 ---- -- Licence: wxWidgets licence ----------------------------------------------------------------------------- + + -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit + package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" + require("wx") + frame = nil childList = {} *************** *** 73,74 **** --- 78,84 ---- frame:Show(true) + -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, + -- otherwise the wxLua program will exit immediately. + -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the + -- MainLoop is already running or will be started by the C++ program. + wx.wxGetApp():MainLoop() Index: veryminimal.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/veryminimal.wx.lua,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** veryminimal.wx.lua 31 May 2007 17:18:56 -0000 1.6 --- veryminimal.wx.lua 22 Jan 2008 04:45:39 -0000 1.7 *************** *** 10,13 **** --- 10,17 ---- ----------------------------------------------------------------------------- + -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit + package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" + require("wx") + frame = nil *************** *** 24,25 **** --- 28,35 ---- main() + + -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, + -- otherwise the wxLua program will exit immediately. + -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the + -- MainLoop is already running or will be started by the C++ program. + wx.wxGetApp():MainLoop() Index: auidemo.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/auidemo.wx.lua,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** auidemo.wx.lua 22 Dec 2007 06:07:17 -0000 1.2 --- auidemo.wx.lua 22 Jan 2008 04:45:39 -0000 1.3 *************** *** 12,15 **** --- 12,18 ---- --]] + -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit + package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" + require("wx") --/* XPM */ *************** *** 1626,1627 **** --- 1629,1635 ---- + -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, + -- otherwise the wxLua program will exit immediately. + -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the + -- MainLoop is already running or will be started by the C++ program. + wx.wxGetApp():MainLoop() Index: grid.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/grid.wx.lua,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** grid.wx.lua 16 Jul 2007 19:35:31 -0000 1.10 --- grid.wx.lua 22 Jan 2008 04:45:39 -0000 1.11 *************** *** 8,11 **** --- 8,14 ---- ----------------------------------------------------------------------------- + -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit + package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" + require("wx") local frame = wx.wxFrame(wx.NULL, wx.wxID_ANY, "wxLua wxGrid Sample", *************** *** 55,56 **** --- 58,64 ---- frame:Show(true) + -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, + -- otherwise the wxLua program will exit immediately. + -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the + -- MainLoop is already running or will be started by the C++ program. + wx.wxGetApp():MainLoop() Index: luamodule.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/luamodule.wx.lua,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** luamodule.wx.lua 4 Jul 2007 05:39:22 -0000 1.6 --- luamodule.wx.lua 22 Jan 2008 04:45:39 -0000 1.7 *************** *** 36,41 **** frame:Show(true) ! -- ALWAYS call wx.wxGetApp():MainLoop() last to keep the program active ! -- otherwise the lua program will exit immediately wx.wxGetApp():MainLoop() --- 36,43 ---- frame:Show(true) ! -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, ! -- otherwise the wxLua program will exit immediately. ! -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the ! -- MainLoop is already running or will be started by the C++ program. wx.wxGetApp():MainLoop() Index: calculator.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/calculator.wx.lua,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** calculator.wx.lua 16 Jul 2007 19:35:31 -0000 1.11 --- calculator.wx.lua 22 Jan 2008 04:45:39 -0000 1.12 *************** *** 10,13 **** --- 10,17 ---- -------------------------------------------------------------------------=--- + -- Load the wxLua module, does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit + package.cpath = package.cpath..";./?.dll;./?.so;../lib/?.so;../lib/vc_dll/?.dll;../lib/bcc_dll/?.dll;../lib/mingw_dll/?.dll;" + require("wx") + -- --------------------------------------------------------------------------- -- Global variables *************** *** 351,352 **** --- 355,362 ---- main() + + -- Call wx.wxGetApp():MainLoop() last to start the wxWidgets event loop, + -- otherwise the wxLua program will exit immediately. + -- Does nothing if running from wxLua, wxLuaFreeze, or wxLuaEdit since the + -- MainLoop is already running or will be started by the C++ program. + wx.wxGetApp():MainLoop() |