Update of /cvsroot/wxlua/wxLua/modules/wxbind/src
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10102/wxLua/modules/wxbind/src
Modified Files:
wxbase_data.cpp
Log Message:
Only push the value for wxObject:DynamicCast if params are ok
Only enable the stack dialog when we're not running a program
Index: wxbase_data.cpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxbase_data.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** wxbase_data.cpp 22 Jul 2007 04:38:28 -0000 1.2
--- wxbase_data.cpp 31 Jul 2007 20:54:02 -0000 1.3
***************
*** 607,613 ****
int iResult = 0;
const char *className = lua_tostring(L, 2);
- lua_pushvalue(L, 1);
if (className != NULL)
{
wxObject *pObject = (wxObject *)wxlState.ttouserdata( 1 );
--- 607,613 ----
int iResult = 0;
const char *className = lua_tostring(L, 2);
if (className != NULL)
{
+ lua_pushvalue(L, 1);
wxObject *pObject = (wxObject *)wxlState.ttouserdata( 1 );
***************
*** 625,632 ****
if (iResult == 0)
! wxlState.terror("wxLua: DynamicCast: Class not found.");
}
else
! wxlState.terror("wxLua: DynamicCast: Incorrect number of parameters.");
return iResult;
--- 625,632 ----
if (iResult == 0)
! wxlState.terror("wxObject:DynamicCast: Class not found.");
}
else
! wxlState.terror("wxObject:DynamicCast: Expected a string name of the class for parameter 2.");
return iResult;
|