Update of /cvsroot/wxlua/wxLua/apps/wxluaedit/src
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv8178/wxLua/apps/wxluaedit/src
Modified Files:
wxluaedit.cpp
Log Message:
Make the wxLuaConsole not rely on the wxApp having a pointer to it so it can
be used easier.
Index: wxluaedit.cpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/apps/wxluaedit/src/wxluaedit.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** wxluaedit.cpp 3 Dec 2008 05:26:03 -0000 1.39
--- wxluaedit.cpp 5 Dec 2008 05:57:21 -0000 1.40
***************
*** 35,39 ****
#include "wxluadebug/include/wxlstack.h"
! class wxLuaConsole;
//#include "art/wxlua.xpm" get it from the lconsole
--- 35,39 ----
#include "wxluadebug/include/wxlstack.h"
! #include "../../wxlua/src/lconsole.cpp"
//#include "art/wxlua.xpm" get it from the lconsole
***************
*** 93,101 ****
const wxLuaState& wxlState = wxNullLuaState);
! wxLuaDebugTarget *m_pDebugTarget;
! wxLuaState m_wxlState;
! wxString m_programName;
! wxLuaConsole *m_luaConsole;
! bool m_want_console;
private:
--- 93,101 ----
const wxLuaState& wxlState = wxNullLuaState);
! wxLuaDebugTarget* m_pDebugTarget;
! wxLuaState m_wxlState;
! wxString m_programName;
! wxLuaConsoleWrapper m_luaConsoleWrapper;
! bool m_want_console;
private:
***************
*** 105,111 ****
IMPLEMENT_APP(wxLuaEditorApp)
- #define WXLUAEDITOR_APP
- #include "../../wxlua/src/lconsole.cpp"
-
// ----------------------------------------------------------------------------
// wxLuaEditorFrame
--- 105,108 ----
***************
*** 150,154 ****
m_pDebugTarget = NULL;
m_programName = argv[0];
- m_luaConsole = NULL;
m_want_console = false;
--- 147,150 ----
***************
*** 374,387 ****
// If they closed the console, but specified they wanted it
// on the command-line, recreate it.
! if (m_want_console && (m_luaConsole == NULL))
{
! m_luaConsole = new wxLuaConsole(NULL, ID_WXLUA_CONSOLE);
! m_luaConsole->Show(true);
}
if (!is_error)
{
! if (m_luaConsole != NULL)
! m_luaConsole->DisplayText(msg);
else
{
--- 370,383 ----
// If they closed the console, but specified they wanted it
// on the command-line, recreate it.
! if (m_want_console && (!m_luaConsoleWrapper.Ok()))
{
! m_luaConsoleWrapper.SetConsole(new wxLuaConsole(&m_luaConsoleWrapper, NULL, ID_WXLUA_CONSOLE));
! m_luaConsoleWrapper.GetConsole()->Show(true);
}
if (!is_error)
{
! if (m_luaConsoleWrapper.Ok())
! m_luaConsoleWrapper.GetConsole()->DisplayText(msg);
else
{
***************
*** 398,407 ****
if (m_pDebugTarget != NULL)
m_pDebugTarget->DisplayError(msg);
! else if (m_luaConsole != NULL)
{
! m_luaConsole->DisplayText(msg);
! m_luaConsole->SetExitOnError(is_error);
if (wxlState.Ok())
! m_luaConsole->DisplayStack(wxlState);
}
else
--- 394,403 ----
if (m_pDebugTarget != NULL)
m_pDebugTarget->DisplayError(msg);
! else if (m_luaConsoleWrapper.Ok())
{
! m_luaConsoleWrapper.GetConsole()->DisplayText(msg);
! m_luaConsoleWrapper.GetConsole()->SetExitOnError(is_error);
if (wxlState.Ok())
! m_luaConsoleWrapper.GetConsole()->DisplayStack(wxlState);
}
else
|