Update of /cvsroot/wxlua/wxLua/apps/wxlua/src
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32329/wxLua/apps/wxlua/src
Modified Files:
wxlua.cpp
Log Message:
Fix bad commit for wxlua.cpp the wxLua executable so it doesn't immediately exit.
Make wxObject:DynamicCast a little more verbose and robust
Index: wxlua.cpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/wxlua.cpp,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -d -r1.50 -r1.51
*** wxlua.cpp 15 Jan 2008 01:04:04 -0000 1.50
--- wxlua.cpp 15 Jan 2008 06:31:05 -0000 1.51
***************
*** 194,200 ****
arg_count++; // remove -e arg
int rc = m_wxlState.RunString(luaCode, wxT("=(command line)"));
if (rc != 0)
{
- run_ok = false;
DisplayMessage(wxlua_LUA_ERR_msg(rc), true, m_wxlState);
break;
--- 194,200 ----
arg_count++; // remove -e arg
int rc = m_wxlState.RunString(luaCode, wxT("=(command line)"));
+ run_ok = (rc == 0);
if (rc != 0)
{
DisplayMessage(wxlua_LUA_ERR_msg(rc), true, m_wxlState);
break;
***************
*** 254,260 ****
int rc = m_wxlState.RunBuffer(wxLuaEditor, wxLuaEditor_len, m_programName);
if (rc != 0)
{
- run_ok = false;
DisplayMessage(wxlua_LUA_ERR_msg(rc), true, m_wxlState);
}
--- 254,260 ----
int rc = m_wxlState.RunBuffer(wxLuaEditor, wxLuaEditor_len, m_programName);
+ run_ok = (rc == 0);
if (rc != 0)
{
DisplayMessage(wxlua_LUA_ERR_msg(rc), true, m_wxlState);
}
***************
*** 279,285 ****
int rc = m_wxlState.RunFile(runFileName);
if (rc != 0)
{
- run_ok = false;
DisplayMessage(wxlua_LUA_ERR_msg(rc), true, m_wxlState);
}
--- 279,285 ----
int rc = m_wxlState.RunFile(runFileName);
+ run_ok = (rc == 0);
if (rc != 0)
{
DisplayMessage(wxlua_LUA_ERR_msg(rc), true, m_wxlState);
}
|