From: John L. <jr...@us...> - 2006-12-08 01:12:39
|
Update of /cvsroot/wxlua/wxLua/samples In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20595/samples Modified Files: editor.wx.lua Log Message: be sure to nil debugServer and display error messages on failure Index: editor.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/editor.wx.lua,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** editor.wx.lua 7 Dec 2006 22:05:53 -0000 1.35 --- editor.wx.lua 8 Dec 2006 01:12:35 -0000 1.36 *************** *** 1572,1575 **** --- 1572,1577 ---- if not ok then debugServer:Delete() + debugServer = nil + DisplayOutput("Error starting the debug server.\n") return nil end *************** *** 1613,1616 **** --- 1615,1619 ---- function (event) DisplayOutput(event:GetMessage().."\n") + DisplayOutput("Debug server disconnected.\n") debugServer:Delete() debugServer = nil *************** *** 1704,1707 **** --- 1707,1712 ---- debugServer:Connect(wx.wxID_ANY, wx.wxEVT_WXLUA_DEBUGGER_EXIT, function (event) + DisplayOutput("\nDebugger Client finished.\n\n") + for id, document in pairs(openDocuments) do local editor = document.editor *************** *** 1711,1720 **** if debugServer then debugServer:Delete() - fIsRunning = false debugServer = nil end SetAllEditorsReadOnly(false) ignoredFilesList = {} - DisplayOutput("\nDebugger Client finished\n\n") end) --- 1716,1724 ---- if debugServer then debugServer:Delete() debugServer = nil + fIsRunning = false end SetAllEditorsReadOnly(false) ignoredFilesList = {} end) *************** *** 1737,1747 **** if debugServer then ok = debugServer:StartClient() - SetAllEditorsReadOnly(true) end if debugServer and ok then DisplayOutput("Waiting for client connection.\n") else DisplayOutput("Unable to create debugger server.\n"..tostring(debugServer)..tostring(ok)) end --- 1741,1755 ---- if debugServer then ok = debugServer:StartClient() end if debugServer and ok then + SetAllEditorsReadOnly(true) DisplayOutput("Waiting for client connection.\n") else DisplayOutput("Unable to create debugger server.\n"..tostring(debugServer)..tostring(ok)) + if debugServer then + debugServer:Delete() + debugServer = nil + end end |