Update of /cvsroot/wxlua/wxLua/modules/wxlua/src
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv27235/wxLua/modules/wxlua/src
Modified Files:
wxlbind.cpp
Log Message:
Add docs for binding.html for wrapping virtual functions in C++
make it possible to replace nonvirtual functions of wxLua userdata with lua functions, test in unittest
add more docs in wxlprint.cpp to explain what is really going on for the function calls
Index: wxlbind.cpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** wxlbind.cpp 21 Jan 2007 23:13:07 -0000 1.49
--- wxlbind.cpp 7 Feb 2007 04:56:24 -0000 1.50
***************
*** 325,332 ****
wxLuaState wxlState(L);
wxCHECK_MSG(wxlState.Ok(), 0, wxT("Invalid wxLuaState"));
// See below, if base_XXX is called then we set this flag so that
// the called function knows to call the base class instead of recalling
// the lua function and recursing.
! wxCHECK_MSG(!wxlState.GetCallBaseClassFunction(), 0, wxT("Base class function call not reset"));
bool fCallbase = false;
--- 325,334 ----
wxLuaState wxlState(L);
wxCHECK_MSG(wxlState.Ok(), 0, wxT("Invalid wxLuaState"));
+
// See below, if base_XXX is called then we set this flag so that
// the called function knows to call the base class instead of recalling
// the lua function and recursing.
! //wxCHECK_MSG(!wxlState.GetCallBaseClassFunction(), 0, wxT("Base class function call not reset"));
! wxlState.SetCallBaseClassFunction(false);
bool fCallbase = false;
***************
*** 392,397 ****
}
! //wxPrintf(wxT("wxLua_lua_getTableFunc func '%s' pClass %d '%s', userdata %d, lightuserdata %d, ttag %d, class_tag %d lua_State %d wxLuaStateRefData %d call base %d\n"),
! // lua2wx(funcName).c_str(), (long)pClass, pClass ? lua2wx(pClass->name).c_str() : wxT(""), init_isuserdata, init_islightuserdata, init_ttag, init_class_tag, (long)L, (long)wxlState.GetRefData(), (int)wxlState.GetCallBaseClassFunction());
if (!fFound)
--- 394,400 ----
}
! //if (lua2wx(funcName).Find(wxT("OnBeginDocument")) != -1)
! // wxPrintf(wxT("wxLua_lua_getTableFunc func '%s' pClass %d '%s', userdata %d, lightuserdata %d, ttag %d, class_tag %d lua_State %d wxLuaStateRefData %d call base %d\n"),
! // lua2wx(funcName).c_str(), (long)pClass, pClass ? lua2wx(pClass->name).c_str() : wxT(""), init_isuserdata, init_islightuserdata, init_ttag, init_class_tag, (long)L, (long)wxlState.GetRefData(), (int)wxlState.GetCallBaseClassFunction());
if (!fFound)
|