From: John L. <jr...@us...> - 2005-11-28 06:05:20
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27690/wxLua/modules/wxlua/src Modified Files: internal.cpp wxlbind.cpp wxlcallb.cpp wxlintrp.cpp wxlstate.cpp Log Message: Use wxLuaState in the bindings #define tpushliteralstring replaced with tpushwxLuaReferences tpushwxLuaNull #define caused linking problems w/ gcc remove unused vars in wxLuaStateRefData Index: internal.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/internal.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** internal.cpp 28 Nov 2005 01:28:54 -0000 1.14 --- internal.cpp 28 Nov 2005 06:05:08 -0000 1.15 *************** *** 109,113 **** bool ret = false; // false indicates index out of range ! tpushliteralstring(L, WXLUAREFERENCES); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (refs table) --- 109,113 ---- bool ret = false; // false indicates index out of range ! tpushwxLuaReferences(L); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (refs table) *************** *** 132,136 **** int LUACALL tgetn (lua_State *L) { ! tpushliteralstring(L, WXLUAREFERENCES); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (refs table) --- 132,136 ---- int LUACALL tgetn (lua_State *L) { ! tpushwxLuaReferences(L); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (refs table) *************** *** 250,253 **** --- 250,264 ---- } + void LUACALL tpushwxLuaReferences(lua_State *L) + { + lua_pushstring(L, wxLuaReferences); //, strlen(wxLuaReferences)-1); // FIXME this used to be #define tpushliteralstring(str, sizeof(str)-1) + + } + + void LUACALL tpushwxLuaNull(lua_State *L) + { + lua_pushstring(L, wxLuaNull); //, strlen(wxLuaNull)-1); + } + //----------------------------------------------------------------------------- // wxLuaObject *************** *** 292,296 **** void wxLuaObject::ModifyAllocationFlags(int iValue) { ! // FIXME - who uses this? if (iValue & 1) m_alloc_flags &= (~wxLUAOBJECT_BOOL); if (iValue & 2) m_alloc_flags &= (~wxLUAOBJECT_INT); --- 303,307 ---- void wxLuaObject::ModifyAllocationFlags(int iValue) { ! // FIXME - who uses and knows how to use this? if (iValue & 1) m_alloc_flags &= (~wxLUAOBJECT_BOOL); if (iValue & 2) m_alloc_flags &= (~wxLUAOBJECT_INT); *************** *** 335,339 **** } ! return (m_iReference != LUA_NOREF) && (tget(GetLuaState(), m_iReference) != 0); } --- 346,350 ---- } ! return (m_iReference != LUA_NOREF) && (m_wxlState.tget(m_iReference) != 0); } *************** *** 346,350 **** void wxLuaObject::SetObject(int iParam) { ! if (m_wxlState.Ok() && (m_iReference != LUA_NOREF)) m_wxlState.tremove(m_iReference); --- 357,361 ---- void wxLuaObject::SetObject(int iParam) { ! if (m_wxlState.Ok() && (m_iReference != LUA_NOREF)) // FIXME should this error out? m_wxlState.tremove(m_iReference); *************** *** 352,358 **** if (m_wxlState.Ok()) - { m_iReference = m_wxlState.tinsert(iParam); - } } --- 363,367 ---- *************** *** 409,412 **** --- 418,425 ---- } + // ---------------------------------------------------------------------------- + // wxLuaCheckStack - dumps the contents of the lua_State + // ---------------------------------------------------------------------------- + wxLuaCheckStack::wxLuaCheckStack(lua_State *lua_state, const wxString &msg) { *************** *** 449,460 **** void wxLuaCheckStack::DumpTable(lua_State *lua_state, const wxString &name) { ! wxHashTable* dumpList = new wxHashTable(wxKEY_INTEGER); lua_pushstring(lua_state, wx2lua(name)); lua_gettable(lua_state, LUA_GLOBALSINDEX); ! DumpTable(lua_state, lua_gettop(lua_state), name, *dumpList, 0); lua_pop(lua_state, 1); - - delete dumpList; } --- 462,471 ---- void wxLuaCheckStack::DumpTable(lua_State *lua_state, const wxString &name) { ! wxHashTable dumpList(wxKEY_INTEGER); lua_pushstring(lua_state, wx2lua(name)); lua_gettable(lua_state, LUA_GLOBALSINDEX); ! DumpTable(lua_state, lua_gettop(lua_state), name, dumpList, 0); lua_pop(lua_state, 1); } *************** *** 1016,1020 **** wxCHECK_MSG(wxlState.Ok(), 1, wxT("Invalid wxLuaState")); ! if (lua_isuserdata(L, 1) && (lua_islightuserdata(L, 1) == 0) && (ttag(L, 1) == wxlState.GetLuaStateRefData()->m_functionTag)) { wxLuaFunction *pFunction = (wxLuaFunction *)wxlState.ttouserdata(1, true); --- 1027,1031 ---- wxCHECK_MSG(wxlState.Ok(), 1, wxT("Invalid wxLuaState")); ! if (lua_isuserdata(L, 1) && (lua_islightuserdata(L, 1) == 0) && (wxlState.ttag(1) == wxlState.GetLuaFunctionTag())) { wxLuaFunction *pFunction = (wxLuaFunction *)wxlState.ttouserdata(1, true); *************** *** 1034,1040 **** WXLUACLASS *pClass = (WXLUACLASS *)lua_touserdata(L, lua_upvalueindex(1)); ! if ((pClass != NULL) && lua_isuserdata(L, 1) && (lua_islightuserdata(L, 1) == 0) && (ttag(L, 1) == *pClass->class_tag)) { ! wxHashTable *pHashTable = (wxHashTable *) wxlState.GetLuaStateRefData()->m_pDerivedList->Delete((int) ttouserdata(L, 1, true)); if (pHashTable != NULL) delete pHashTable; --- 1045,1051 ---- WXLUACLASS *pClass = (WXLUACLASS *)lua_touserdata(L, lua_upvalueindex(1)); ! if ((pClass != NULL) && lua_isuserdata(L, 1) && (lua_islightuserdata(L, 1) == 0) && (wxlState.ttag(1) == *pClass->class_tag)) { ! wxHashTable *pHashTable = (wxHashTable *) wxlState.GetLuaStateRefData()->m_pDerivedList->Delete((int)wxlState.ttouserdata(1, true)); if (pHashTable != NULL) delete pHashTable; *************** *** 1158,1162 **** if (pFunction != NULL) { ! wxlState.tpushusertag(pFunction, wxlState.GetLuaStateRefData()->m_functionTag); result = 1; fFound = true; --- 1169,1173 ---- if (pFunction != NULL) { ! wxlState.tpushusertag(pFunction, wxlState.GetLuaFunctionTag()); result = 1; fFound = true; *************** *** 1237,1241 **** wxCHECK_MSG(wxlState.Ok(), 0, wxT("Invalid wxLuaState")); ! if (lua_isuserdata(L, 1) && (lua_islightuserdata(L, 1) == 0) && (ttag(L, 1) == wxlState.GetLuaStateRefData()->m_functionTag)) { wxLuaFunction *pFunction = (wxLuaFunction *)wxlState.ttouserdata(1); --- 1248,1252 ---- wxCHECK_MSG(wxlState.Ok(), 0, wxT("Invalid wxLuaState")); ! if (lua_isuserdata(L, 1) && (lua_islightuserdata(L, 1) == 0) && (ttag(L, 1) == wxlState.GetLuaFunctionTag())) { wxLuaFunction *pFunction = (wxLuaFunction *)wxlState.ttouserdata(1); *************** *** 1251,1257 **** wxCHECK_MSG(wxlState.Ok(), NULL, wxT("Invalid wxLuaState")); ! if (nTag == wxlState.GetLuaStateRefData()->m_wxLuaNull) return wxLuaNull; ! if (nTag == wxlState.GetLuaStateRefData()->m_functionTag) return "wxLuaFunction"; --- 1262,1268 ---- wxCHECK_MSG(wxlState.Ok(), NULL, wxT("Invalid wxLuaState")); ! if (nTag == wxlState.GetLuaNull()) return wxLuaNull; ! if (nTag == wxlState.GetLuaFunctionTag()) return "wxLuaFunction"; Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** wxlstate.cpp 28 Nov 2005 01:28:55 -0000 1.7 --- wxlstate.cpp 28 Nov 2005 06:05:08 -0000 1.8 *************** *** 77,82 **** } ! // Not found ! return NULL; } --- 77,81 ---- } ! return NULL; // Not found } *************** *** 104,108 **** } ! return NULL; } --- 103,107 ---- } ! return NULL; // Not found } *************** *** 186,196 **** m_lua_State_static = false; m_typesRegistered = false; - m_startTag = 0; - m_lastTag = 0; m_functionTag = 0; - m_wxLuaTable = 0; m_wxLuaNull = 0; m_wxDeleteTable = 0; ! m_inEventType = -1; m_pDerivedList = new wxHashTable(wxKEY_INTEGER); m_pTrackedList = new wxHashTable(wxKEY_INTEGER); --- 185,192 ---- m_lua_State_static = false; m_typesRegistered = false; m_functionTag = 0; m_wxLuaNull = 0; m_wxDeleteTable = 0; ! m_inEventType = wxEVT_NULL; m_pDerivedList = new wxHashTable(wxKEY_INTEGER); m_pTrackedList = new wxHashTable(wxKEY_INTEGER); *************** *** 275,279 **** } ! void wxLuaStateRefData::CleanupWxLua(bool closeLua /* = true*/) { // from lua50/lib/lbaselib.c, the collectgarbage lua function --- 271,275 ---- } ! void wxLuaStateRefData::CleanupWxLua(bool closeLua) { // from lua50/lib/lbaselib.c, the collectgarbage lua function *************** *** 333,337 **** } ! lua_pushstring(m_lua_State, WXLUAREFERENCES); lua_pushnil(m_lua_State); lua_rawset(m_lua_State, LUA_REGISTRYINDEX); --- 329,333 ---- } ! tpushwxLuaReferences(m_lua_State); lua_pushnil(m_lua_State); lua_rawset(m_lua_State, LUA_REGISTRYINDEX); *************** *** 454,458 **** if ( refData ) { ! // we need to inc the ref count wxLuaState lS; lS.SetRefData(refData); --- 450,454 ---- if ( refData ) { ! // we need to increment the ref count wxLuaState lS; lS.SetRefData(refData); *************** *** 466,470 **** bool wxLuaState::Ok() const { ! return (m_refData != NULL) && GetLuaStateRefData()->m_lua_State; } --- 462,466 ---- bool wxLuaState::Ok() const { ! return (m_refData != NULL) && M_WXLSTATEDATA->m_lua_State; } *************** *** 472,479 **** { wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); ! return GetLuaStateRefData()->CloseLuaState(force); } - lua_State* wxLuaState::GetLuaState() const { --- 468,474 ---- { wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); ! return M_WXLSTATEDATA->CloseLuaState(force); } lua_State* wxLuaState::GetLuaState() const { *************** *** 482,485 **** --- 477,486 ---- } + wxEventType wxLuaState::GetInEventType() const + { + wxCHECK_MSG(Ok(), wxEVT_NULL, wxT("Invalid wxLuaState")); + return M_WXLSTATEDATA->m_inEventType; + } + void wxLuaState::RegisterBindings(bool registerTypes) { *************** *** 489,493 **** // create references table in registry ! lua_pushstring(L, WXLUAREFERENCES); lua_newtable(L); lua_rawset(L, LUA_REGISTRYINDEX); --- 490,494 ---- // create references table in registry ! tpushwxLuaReferences(L); lua_newtable(L); lua_rawset(L, LUA_REGISTRYINDEX); *************** *** 662,693 **** } // ---------------------------------------------------------------------------- // memory tracking functions bool wxLuaState::removeTrackedMemory(void *pObject, bool fDelete) { wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")) - bool result = false; wxObject *pDeleteObject = M_WXLSTATEDATA->m_pTrackedList->Delete((int) pObject); ! if (fDelete && pDeleteObject != NULL) ! { delete pDeleteObject; ! result = true; ! } return result; } ! void wxLuaState::addToTrackedMemoryList(wxObject *pObject) { ! wxCHECK_RET(pObject, wxT("Invalid lua state and/or wxObject")); ! wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")) ! M_WXLSTATEDATA->m_pTrackedList->Put((int)pObject, pObject); } ! bool wxLuaIsParentWindowTracked(wxList *list, wxWindow* win) { ! wxCHECK_MSG(list && win, false, wxT("Invalid list or parent")); wxWindow *parent = win; while (parent) --- 663,742 ---- } + wxLuaBindingList* wxLuaState::GetLuaBindingList() const + { + wxCHECK_MSG(GetRefData() != NULL, NULL, wxT("Invalid wxLuaState")); + return &M_WXLSTATEDATA->m_bindings; + } + bool wxLuaState::GetTypesRegistered() const + { + wxCHECK_MSG(GetRefData() != NULL, false, wxT("Invalid wxLuaState")); + return M_WXLSTATEDATA->m_typesRegistered; + } + int wxLuaState::GetLuaFunctionTag() const + { + wxCHECK_MSG(GetRefData() != NULL, 0, wxT("Invalid wxLuaState")); + return M_WXLSTATEDATA->m_functionTag; + } + int wxLuaState::GetLuaNull() const + { + wxCHECK_MSG(GetRefData() != NULL, 0, wxT("Invalid wxLuaState")); + return M_WXLSTATEDATA->m_wxLuaNull; + } + int wxLuaState::GetLuaDeleteTable() const + { + wxCHECK_MSG(GetRefData() != NULL, 0, wxT("Invalid wxLuaState")); + return M_WXLSTATEDATA->m_wxDeleteTable; + } + // ---------------------------------------------------------------------------- // memory tracking functions + void wxLuaState::addToTrackedMemoryList(wxObject *pObject) + { + wxCHECK_RET(Ok() && pObject, wxT("Invalid wxLuaState or wxObject to track")); + M_WXLSTATEDATA->m_pTrackedList->Put((int)pObject, pObject); + } + bool wxLuaState::removeTrackedMemory(void *pObject, bool fDelete) { wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")) wxObject *pDeleteObject = M_WXLSTATEDATA->m_pTrackedList->Delete((int) pObject); ! bool result = pDeleteObject != NULL; ! ! if (fDelete && (pDeleteObject != NULL)) delete pDeleteObject; ! return result; } ! void wxLuaState::addToTrackedWindowList(wxWindow *pWindow) { ! wxCHECK_RET(Ok() && pWindow, wxT("Invalid wxLuaState or wxWindow")); ! ! // don't track these windows since they're supposed to be attached ! if (wxDynamicCast(pWindow, wxMenuBar) != NULL) return; ! if (wxDynamicCast(pWindow, wxToolBar) != NULL) return; ! ! // only need to track parent window, it deletes children for us ! if (!isWindowTracked(pWindow)) ! { ! M_WXLSTATEDATA->m_pWindowList->Append(pWindow); ! new wxLuaCallback(*this, 3, pWindow->GetId(), wxEVT_DESTROY, pWindow->GetEventHandler()); ! } } ! void wxLuaState::removeTrackedWindow(wxWindow *pWindow) { ! wxCHECK_RET(Ok() && pWindow, wxT("Invalid wxLuaState or wxWindow")); ! M_WXLSTATEDATA->m_pWindowList->DeleteObject(pWindow); ! } ! ! bool wxLuaState::isWindowTracked(wxWindow *win) const ! { ! wxCHECK_MSG(Ok() && win, false, wxT("Invalid wxLuaState or wxWindow")); ! wxWindow *parent = win; + wxList* list = M_WXLSTATEDATA->m_pWindowList; while (parent) *************** *** 702,722 **** } - void wxLuaState::addToTrackedWindowList(wxWindow *pWindow) - { - wxCHECK_RET(pWindow, wxT("Invalid lua state and/or wxWindow")); - wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")) - - // don't track these windows since they're supposed to be attached - if (wxDynamicCast(pWindow, wxMenuBar) != NULL) return; - if (wxDynamicCast(pWindow, wxToolBar) != NULL) return; - - // only need to track parent window, it deletes children for us - if (!wxLuaIsParentWindowTracked(M_WXLSTATEDATA->m_pWindowList, pWindow)) - { - M_WXLSTATEDATA->m_pWindowList->Append(pWindow); - new wxLuaCallback(*this, 3, pWindow->GetId(), wxEVT_DESTROY, pWindow->GetEventHandler()); - } - } - // ---------------------------------------------------------------------------- // wxLua Lua Registry Table Functions --- 751,754 ---- *************** *** 738,742 **** int nTop = lua_gettop(L); ! tpushliteralstring(L, WXLUAREFERENCES); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result --- 770,774 ---- int nTop = lua_gettop(L); ! tpushwxLuaReferences(L); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result *************** *** 788,792 **** bool ret = false; // false indicates index out of range ! tpushliteralstring(L, WXLUAREFERENCES); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (refs table) --- 820,824 ---- bool ret = false; // false indicates index out of range ! tpushwxLuaReferences(L); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (refs table) *************** *** 821,825 **** bool ret = false; // false indicates index out of range ! tpushliteralstring(L, WXLUAREFERENCES); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (refs table) --- 853,857 ---- bool ret = false; // false indicates index out of range ! tpushwxLuaReferences(L); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (refs table) *************** *** 845,849 **** lua_State* L = M_WXLSTATEDATA->m_lua_State; ! tpushliteralstring(L, WXLUAREFERENCES); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (refs table) --- 877,881 ---- lua_State* L = M_WXLSTATEDATA->m_lua_State; ! tpushwxLuaReferences(L); lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (refs table) *************** *** 1025,1028 **** --- 1057,1072 ---- // wxLua get data type + void wxLuaState::tpushstring(const char *str) + { + wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")) + lua_pushstring(M_WXLSTATEDATA->m_lua_State, str); + } + + void wxLuaState::tpushliteralstring(const char *str, size_t len) + { + wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")) + lua_pushlstring(M_WXLSTATEDATA->m_lua_State, str, len); + } + void* wxLuaState::getuserdatatype(int iParam, int iParamTag) { *************** *** 1055,1059 **** error: ! terror(wx2lua(wxString::Format(_("wxLua: Unexpected user defined data type %d for parameter %d."), iParamTag, iParam))); return NULL; } --- 1099,1104 ---- error: ! ! terror(wx2lua(wxString::Format(_("wxLua: Unexpected user defined data type %d '%s' for parameter %d."), iParamTag, lua2wx(GetLuaTagName(iParamTag)).c_str(), iParam))); return NULL; } Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxlbind.cpp 26 Nov 2005 08:46:57 -0000 1.3 --- wxlbind.cpp 28 Nov 2005 06:05:08 -0000 1.4 *************** *** 19,33 **** #ifndef WX_PRECOMP #include "wx/wx.h" - #include "wx/app.h" #endif - #include "wx/datetime.h" - - #include "../../../bindings/wxwidgets/luasetup.h.in" // get the base library setup parameters - #include "wxlua/include/internal.h" - #include "wxlua/include/wxlcallb.h" #include "wxlua/include/wxlbind.h" ! #include "wxbind/include/wxbind.h" ! #include "wxlua/include/wxlintrp.h" #include "wx/listimpl.cpp" --- 19,26 ---- #ifndef WX_PRECOMP #include "wx/wx.h" #endif #include "wxlua/include/wxlbind.h" ! #include "wxlua/include/internal.h" #include "wx/listimpl.cpp" *************** *** 52,56 **** } - // ---------------------------------------------------------------------------- // wxLuaBinding --- 45,48 ---- *************** *** 59,65 **** IMPLEMENT_CLASS(wxLuaBinding, wxObject) ! wxLuaBinding::wxLuaBinding() ! : ! wxObject(), pfGetClassList(NULL), pfGetDefineList(NULL), --- 51,55 ---- IMPLEMENT_CLASS(wxLuaBinding, wxObject) ! wxLuaBinding::wxLuaBinding() : wxObject(), pfGetClassList(NULL), pfGetDefineList(NULL), *************** *** 67,80 **** pfGetObjectList(NULL), pfGetBuiltinList(NULL), ! m_classCount(0), ! m_classList(NULL), ! m_defineCount(0), ! m_defineList(NULL), ! m_eventCount(0), ! m_eventList(NULL), ! m_objectCount(0), ! m_objectList(NULL), ! m_builtinCount(0), ! m_builtinList(NULL), m_typesRegistered(false), m_startTag(0), --- 57,65 ---- pfGetObjectList(NULL), pfGetBuiltinList(NULL), ! m_classCount(0), m_classList(NULL), ! m_defineCount(0), m_defineList(NULL), ! m_eventCount(0), m_eventList(NULL), ! m_objectCount(0), m_objectList(NULL), ! m_builtinCount(0), m_builtinList(NULL), m_typesRegistered(false), m_startTag(0), *************** *** 108,112 **** // create references table in registry ! // lua_pushstring(L, WXLUAREFERENCES); // lua_newtable(L); // lua_rawset(L, LUA_REGISTRYINDEX); --- 93,97 ---- // create references table in registry ! // lua_pushstring(L, wxLuaReferences); // lua_newtable(L); // lua_rawset(L, LUA_REGISTRYINDEX); *************** *** 163,167 **** //wxPrintf(wxT("RegisterGenClasses %d '%s'\n"), iTag, lua2wx(pClass->name).c_str()); ! for (unsigned iFunction = 0; iFunction < funcCount; iFunction++) { tsettagmethod (L, iTag, funcTable[iFunction].name, funcTable[iFunction].func, (void *) pClass); --- 148,152 ---- //wxPrintf(wxT("RegisterGenClasses %d '%s'\n"), iTag, lua2wx(pClass->name).c_str()); ! for (size_t iFunction = 0; iFunction < funcCount; iFunction++) { tsettagmethod (L, iTag, funcTable[iFunction].name, funcTable[iFunction].func, (void *) pClass); *************** *** 183,187 **** // register all the builtin functions m_builtinList = (*pfGetBuiltinList)(m_builtinCount); ! for (size_t iBuiltin= 0; iBuiltin < m_builtinCount; ++iBuiltin) { WXLUAMETHOD *pMethod = m_builtinList + iBuiltin; --- 168,172 ---- // register all the builtin functions m_builtinList = (*pfGetBuiltinList)(m_builtinCount); ! for (size_t iBuiltin = 0; iBuiltin < m_builtinCount; ++iBuiltin) { WXLUAMETHOD *pMethod = m_builtinList + iBuiltin; *************** *** 245,252 **** bool wxLuaBinding::SetBaseClassTag(WXLUACLASS *pClass) { ! if (!pClass->baseclass) ! return false; ! ! if (!m_classList) return false; --- 230,234 ---- bool wxLuaBinding::SetBaseClassTag(WXLUACLASS *pClass) { ! if (!pClass->baseclass || !m_classList) return false; Index: wxlintrp.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlintrp.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxlintrp.cpp 26 Nov 2005 08:46:57 -0000 1.3 --- wxlintrp.cpp 28 Nov 2005 06:05:08 -0000 1.4 *************** *** 262,266 **** // FIXME - for select event types we don't want to do anything ! wxEventType evtType = luaInterpreter->GetwxLuaState().GetLuaStateRefData()->m_inEventType; if ((evtType != -1)) //(evtType == wxEVT_IDLE) && (evtType == wxEVT_PAINT) && --- 262,266 ---- // FIXME - for select event types we don't want to do anything ! wxEventType evtType = luaInterpreter->GetwxLuaState().GetInEventType(); if ((evtType != -1)) //(evtType == wxEVT_IDLE) && (evtType == wxEVT_PAINT) && Index: wxlcallb.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlcallb.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wxlcallb.cpp 28 Nov 2005 01:28:55 -0000 1.4 --- wxlcallb.cpp 28 Nov 2005 06:05:08 -0000 1.5 *************** *** 89,93 **** { event.Skip(); ! wxlState.GetLuaStateRefData()->m_pWindowList->DeleteObject((wxWindow*)event.GetEventObject()); // delete the reference to this handler since we're clearing it wxlState.GetLuaStateRefData()->m_pAppHandlerList->DeleteObject(this); --- 89,93 ---- { event.Skip(); ! wxlState.removeTrackedWindow((wxWindow*)event.GetEventObject()); // delete the reference to this handler since we're clearing it wxlState.GetLuaStateRefData()->m_pAppHandlerList->DeleteObject(this); *************** *** 119,123 **** theCallback->CallFunction(&event); ! wxlState.GetLuaStateRefData()->m_inEventType = -1; } --- 119,123 ---- theCallback->CallFunction(&event); ! wxlState.GetLuaStateRefData()->m_inEventType = wxEVT_NULL; } *************** *** 188,192 **** // get a reference to the destroy handler table ! if (m_wxlState.tget(m_wxlState.GetLuaStateRefData()->m_wxDeleteTable)) { // create a reference to object --- 188,192 ---- // get a reference to the destroy handler table ! if (m_wxlState.tget(m_wxlState.GetLuaDeleteTable())) { // create a reference to object *************** *** 238,242 **** // Note: do not remove from m_pDestroyHandlerList here, wait 'till destructor ! if (m_wxlState.tget(m_wxlState.GetLuaStateRefData()->m_wxDeleteTable)) { lua_State* L = m_wxlState.GetLuaState(); --- 238,242 ---- // Note: do not remove from m_pDestroyHandlerList here, wait 'till destructor ! if (m_wxlState.tget(m_wxlState.GetLuaDeleteTable())) { lua_State* L = m_wxlState.GetLuaState(); |