From: John L. <jr...@us...> - 2007-12-05 05:54:18
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20622/wxLua/modules/wxlua/src Modified Files: wxlbind.cpp wxlcallb.cpp wxlstate.cpp wxlua_bind.cpp Log Message: Rename wxLuaBinding/wxLuaState::GetLuaClass() to GetBindClass() since it gets the wxLuaBindClass struct Moved the code for searching the binding classes to static functions of wxLuaBinding to keep the code together with the wxLuaBinding class Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.143 retrieving revision 1.144 diff -C2 -d -r1.143 -r1.144 *** wxlstate.cpp 5 Dec 2007 00:34:46 -0000 1.143 --- wxlstate.cpp 5 Dec 2007 05:54:11 -0000 1.144 *************** *** 892,896 **** // delete all of the derived methods we've pushed ! lua_pushnil(L); while (lua_next(L, -2) != 0) { --- 892,896 ---- // delete all of the derived methods we've pushed ! lua_pushnil(L); while (lua_next(L, -2) != 0) { *************** *** 1193,1205 **** // remove refs table to try to clear memory gracefully lua_pushlightuserdata(m_lua_State, &wxlua_lreg_refs_key); ! lua_pushnil(m_lua_State); lua_rawset(m_lua_State, LUA_REGISTRYINDEX); lua_pushlightuserdata(m_lua_State, &wxlua_lreg_debug_refs_key); ! lua_pushnil(m_lua_State); lua_rawset(m_lua_State, LUA_REGISTRYINDEX); //lua_pushlightuserdata(m_lua_State, &wxlua_lreg_derivedmethods_key); // gc will delete them ! //lua_pushnil(m_lua_State); //lua_rawset(m_lua_State, LUA_REGISTRYINDEX); --- 1193,1205 ---- // remove refs table to try to clear memory gracefully lua_pushlightuserdata(m_lua_State, &wxlua_lreg_refs_key); ! lua_pushnil(m_lua_State); lua_rawset(m_lua_State, LUA_REGISTRYINDEX); lua_pushlightuserdata(m_lua_State, &wxlua_lreg_debug_refs_key); ! lua_pushnil(m_lua_State); lua_rawset(m_lua_State, LUA_REGISTRYINDEX); //lua_pushlightuserdata(m_lua_State, &wxlua_lreg_derivedmethods_key); // gc will delete them ! //lua_pushnil(m_lua_State); //lua_rawset(m_lua_State, LUA_REGISTRYINDEX); *************** *** 1246,1250 **** if (cb && (cb->GetwxLuaState().GetRefData() != this)) // don't unref us cb->ClearwxLuaState(); ! lua_pop(L, 1); // pop value, lua_next will pop key at end } --- 1246,1250 ---- if (cb && (cb->GetwxLuaState().GetRefData() != this)) // don't unref us cb->ClearwxLuaState(); ! lua_pop(L, 1); // pop value, lua_next will pop key at end } *************** *** 1272,1276 **** cb->ClearwxLuaState(); } ! lua_pop(L, 1); // pop value, lua_next will pop key at end } --- 1272,1276 ---- cb->ClearwxLuaState(); } ! lua_pop(L, 1); // pop value, lua_next will pop key at end } *************** *** 1820,1823 **** --- 1820,1827 ---- { wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")); + + // Note: It may be possible to allow this in the future if there is a need. + wxCHECK_RET(!GetBindingsRegistered(), wxT("wxLua bindings already registered")); + lua_State* L = M_WXLSTATEDATA->m_lua_State; *************** *** 1897,1909 **** const wxLuaBindClass* wxlClass = NULL; ! wxlClass = GetLuaClass("wxEvent"); wxCHECK_RET(wxlClass, wxT("wxEvent Lua tag is missing in wxLuaState, forgot to add wxWidgets binding?")); g_wxluatag_wxEvent = *wxlClass->class_tag; ! wxlClass = GetLuaClass("wxString"); wxCHECK_RET(wxlClass, wxT("wxString Lua tag is missing in wxLuaState, forgot to add wxWidgets binding?")); g_wxluatag_wxString = *wxlClass->class_tag; ! wxlClass = GetLuaClass("wxWindow"); wxCHECK_RET(wxlClass, wxT("wxWindow Lua tag is missing in wxLuaState, forgot to add wxWidgets binding?")); g_wxluatag_wxWindow = *wxlClass->class_tag; --- 1901,1913 ---- const wxLuaBindClass* wxlClass = NULL; ! wxlClass = GetBindClass("wxEvent"); wxCHECK_RET(wxlClass, wxT("wxEvent Lua tag is missing in wxLuaState, forgot to add wxWidgets binding?")); g_wxluatag_wxEvent = *wxlClass->class_tag; ! wxlClass = GetBindClass("wxString"); wxCHECK_RET(wxlClass, wxT("wxString Lua tag is missing in wxLuaState, forgot to add wxWidgets binding?")); g_wxluatag_wxString = *wxlClass->class_tag; ! wxlClass = GetBindClass("wxWindow"); wxCHECK_RET(wxlClass, wxT("wxWindow Lua tag is missing in wxLuaState, forgot to add wxWidgets binding?")); g_wxluatag_wxWindow = *wxlClass->class_tag; *************** *** 1913,1928 **** { wxCHECK_MSG(GetRefData() != NULL, NULL, wxT("Invalid wxLuaState")); ! wxLuaBindingList::compatibility_iterator node; ! for (node = M_WXLSTATEDATA->m_wxlStateData->m_bindingList.GetFirst(); node; node = node->GetNext() ) ! { ! wxLuaBinding* binding = node->GetData(); ! if (binding->GetBindingName() == bindingName) ! return binding; ! } ! ! return NULL; } ! const wxLuaBindClass* wxLuaState::GetLuaClass(int class_tag) const { wxCHECK_MSG(Ok(), NULL, wxT("Invalid wxLuaState")); --- 1917,1924 ---- { wxCHECK_MSG(GetRefData() != NULL, NULL, wxT("Invalid wxLuaState")); ! return wxLuaBinding::GetLuaBinding(bindingName, &M_WXLSTATEDATA->m_wxlStateData->m_bindingList); } ! const wxLuaBindClass* wxLuaState::GetBindClass(int class_tag) const { wxCHECK_MSG(Ok(), NULL, wxT("Invalid wxLuaState")); *************** *** 1933,1983 **** // we shouldn't ever need this code if (wxlClass == NULL) ! { ! wxLuaBindingList::compatibility_iterator node; ! for (node = M_WXLSTATEDATA->m_wxlStateData->m_bindingList.GetFirst(); node; node = node->GetNext() ) ! { ! wxLuaBinding* binding = node->GetData(); ! wxlClass = binding->GetLuaClass(class_tag); ! ! if (wxlClass) break; ! } ! } return wxlClass; } ! ! const wxLuaBindClass* wxLuaState::GetLuaClass(const char* className) const { ! wxCHECK_MSG(GetRefData() != NULL, NULL, wxT("Invalid wxLuaState")); return wxluaT_getclass(M_WXLSTATEDATA->m_lua_State, className); } ! ! const wxLuaBindClass* wxLuaState::GetLuaClass(const wxLuaBindMethod* method) const { ! wxLuaBindingList::compatibility_iterator node; ! for (node = M_WXLSTATEDATA->m_wxlStateData->m_bindingList.GetFirst(); node; node = node->GetNext() ) ! { ! wxLuaBinding* binding = node->GetData(); ! ! const wxLuaBindClass *pLuaClass = binding->GetLuaClass(method); ! if (pLuaClass) ! return pLuaClass; ! } ! ! return NULL; } ! const wxLuaBindClass* wxLuaState::GetLuaClass(const wxLuaBindCFunc* method_cfunc) const { ! wxLuaBindingList::compatibility_iterator node; ! for (node = M_WXLSTATEDATA->m_wxlStateData->m_bindingList.GetFirst(); node; node = node->GetNext() ) ! { ! wxLuaBinding* binding = node->GetData(); ! ! const wxLuaBindClass *pLuaClass = binding->GetLuaClass(method_cfunc); ! if (pLuaClass) ! return pLuaClass; ! } ! ! return NULL; } --- 1929,1950 ---- // we shouldn't ever need this code if (wxlClass == NULL) ! wxlClass = wxLuaBinding::GetBindClass(class_tag, &M_WXLSTATEDATA->m_wxlStateData->m_bindingList); return wxlClass; } ! const wxLuaBindClass* wxLuaState::GetBindClass(const char* className) const { ! wxCHECK_MSG(Ok(), NULL, wxT("Invalid wxLuaState")); return wxluaT_getclass(M_WXLSTATEDATA->m_lua_State, className); } ! const wxLuaBindClass* wxLuaState::GetBindClass(const wxLuaBindMethod* method) const { ! wxCHECK_MSG(GetRefData() != NULL, NULL, wxT("Invalid wxLuaState")); ! return wxLuaBinding::GetBindClass(method, &M_WXLSTATEDATA->m_wxlStateData->m_bindingList); } ! const wxLuaBindClass* wxLuaState::GetBindClass(const wxLuaBindCFunc* method_cfunc) const { ! wxCHECK_MSG(GetRefData() != NULL, NULL, wxT("Invalid wxLuaState")); ! return wxLuaBinding::GetBindClass(method_cfunc, &M_WXLSTATEDATA->m_wxlStateData->m_bindingList); } *************** *** 1988,2006 **** } ! const wxLuaBindEvent* wxLuaState::GetLuaEvent(wxEventType eventType_) const { wxCHECK_MSG(Ok(), NULL, wxT("Invalid wxLuaState")); ! ! wxLuaBindingList::compatibility_iterator node; ! for (node = M_WXLSTATEDATA->m_wxlStateData->m_bindingList.GetFirst(); node; node = node->GetNext()) ! { ! wxLuaBinding* binding = node->GetData(); ! const wxLuaBindEvent *pLuaEvent = binding->GetEvent(eventType_); ! ! if (pLuaEvent) ! return pLuaEvent; ! } ! ! return NULL; } --- 1955,1962 ---- } ! const wxLuaBindEvent* wxLuaState::GetBindEvent(wxEventType eventType) const { wxCHECK_MSG(Ok(), NULL, wxT("Invalid wxLuaState")); ! return wxLuaBinding::GetBindEvent(eventType, &M_WXLSTATEDATA->m_wxlStateData->m_bindingList); } *************** *** 2202,2209 **** lua_pushlightuserdata(L, &wxlua_lreg_evtcallbacks_key); // push key ! lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push value (table) lua_pushlightuserdata(L, callback); // push key ! lua_pushlightuserdata(L, callback->GetEvtHandler()); // push value lua_rawset(L, -3); // set t[key] = value; pops key and value --- 2158,2165 ---- lua_pushlightuserdata(L, &wxlua_lreg_evtcallbacks_key); // push key ! lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push value (table) lua_pushlightuserdata(L, callback); // push key ! lua_pushlightuserdata(L, callback->GetEvtHandler()); // push value lua_rawset(L, -3); // set t[key] = value; pops key and value *************** *** 2216,2223 **** lua_pushlightuserdata(L, &wxlua_lreg_evtcallbacks_key); // push key ! lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push value (table) lua_pushlightuserdata(L, callback); // push key ! lua_pushnil(L); // push value lua_rawset(L, -3); // set t[key] = value; pops key and value --- 2172,2179 ---- lua_pushlightuserdata(L, &wxlua_lreg_evtcallbacks_key); // push key ! lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push value (table) lua_pushlightuserdata(L, callback); // push key ! lua_pushnil(L); // push value lua_rawset(L, -3); // set t[key] = value; pops key and value *************** *** 2255,2260 **** } } ! ! names.Add(wxString::Format(wxT("%s (%d) wxEvtHandler(%p)-wxLuacallback(%p)"), evtName.c_str(), (int)wxlCallback->GetEventType(), wxlCallback->GetEvtHandler(), wxlCallback)); --- 2211,2216 ---- } } ! ! names.Add(wxString::Format(wxT("%s (%d) wxEvtHandler(%p)-wxLuacallback(%p)"), evtName.c_str(), (int)wxlCallback->GetEventType(), wxlCallback->GetEvtHandler(), wxlCallback)); *************** *** 2274,2278 **** lua_pushlightuserdata(L, &wxlua_lreg_windestroycallbacks_key); // push key ! lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push value (table) lua_pushlightuserdata(L, callback); // push key --- 2230,2234 ---- lua_pushlightuserdata(L, &wxlua_lreg_windestroycallbacks_key); // push key ! lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push value (table) lua_pushlightuserdata(L, callback); // push key *************** *** 2280,2287 **** lua_rawset(L, -3); // set t[key] = value; pops key and value ! lua_pushlightuserdata(L, callback->GetWindow()); // push key lua_pushlightuserdata(L, callback); // push value lua_rawset(L, -3); // set t[key] = value; pops key and value ! lua_pop(L, 1); // pop table } --- 2236,2243 ---- lua_rawset(L, -3); // set t[key] = value; pops key and value ! lua_pushlightuserdata(L, callback->GetWindow()); // push key lua_pushlightuserdata(L, callback); // push value lua_rawset(L, -3); // set t[key] = value; pops key and value ! lua_pop(L, 1); // pop table } *************** *** 2292,2296 **** lua_pushlightuserdata(L, &wxlua_lreg_windestroycallbacks_key); // push key ! lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push value (table) lua_pushlightuserdata(L, callback); // push key --- 2248,2252 ---- lua_pushlightuserdata(L, &wxlua_lreg_windestroycallbacks_key); // push key ! lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push value (table) lua_pushlightuserdata(L, callback); // push key *************** *** 2298,2305 **** lua_rawset(L, -3); // set t[key] = value; pops key and value ! lua_pushlightuserdata(L, callback->GetWindow()); // push key lua_pushnil(L); // push value lua_rawset(L, -3); // set t[key] = value; pops key and value ! lua_pop(L, 1); // pop table --- 2254,2261 ---- lua_rawset(L, -3); // set t[key] = value; pops key and value ! lua_pushlightuserdata(L, callback->GetWindow()); // push key lua_pushnil(L); // push value lua_rawset(L, -3); // set t[key] = value; pops key and value ! lua_pop(L, 1); // pop table *************** *** 2491,2495 **** lua_pushlightuserdata(L, &wxlua_lreg_windestroycallbacks_key); // push key ! lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push value (table) lua_pushlightuserdata(L, win); // push key --- 2447,2451 ---- lua_pushlightuserdata(L, &wxlua_lreg_windestroycallbacks_key); // push key ! lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push value (table) lua_pushlightuserdata(L, win); // push key *************** *** 2794,2798 **** return wxT("wxLuaFunction"); ! const wxLuaBindClass *wxlClass = GetLuaClass(tag); if (wxlClass) return lua2wx(wxlClass->name); --- 2750,2754 ---- return wxT("wxLuaFunction"); ! const wxLuaBindClass *wxlClass = GetBindClass(tag); if (wxlClass) return lua2wx(wxlClass->name); *************** *** 3573,3577 **** wxString className; ! const wxLuaBindClass* wxlClass = GetLuaClass(method); if (wxlClass) className = lua2wx(wxlClass->name) + wxT("::"); --- 3529,3533 ---- wxString className; ! const wxLuaBindClass* wxlClass = GetBindClass(method); if (wxlClass) className = lua2wx(wxlClass->name) + wxT("::"); Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.98 retrieving revision 1.99 diff -C2 -d -r1.98 -r1.99 *** wxlbind.cpp 5 Dec 2007 00:34:46 -0000 1.98 --- wxlbind.cpp 5 Dec 2007 05:54:11 -0000 1.99 *************** *** 661,665 **** // and share the m_luaTable_ref to that of the previously loaded binding wxLuaBindingList::compatibility_iterator node = wxlState.GetLuaBindingList()->GetFirst(); ! for (; node; node = node->GetNext()) { wxLuaBinding* binding = node->GetData(); --- 661,665 ---- // and share the m_luaTable_ref to that of the previously loaded binding wxLuaBindingList::compatibility_iterator node = wxlState.GetLuaBindingList()->GetFirst(); ! while (node) { wxLuaBinding* binding = node->GetData(); *************** *** 670,673 **** --- 670,675 ---- break; } + + node = node->GetNext(); } *************** *** 815,819 **** // add table to the binding table t[wxlMethod->name] = { this table } ! lua_rawset(L, -3); #elif 0 // C++ constructors are userdata, use metatable for access to items. --- 817,821 ---- // add table to the binding table t[wxlMethod->name] = { this table } ! lua_rawset(L, -3); #elif 0 // C++ constructors are userdata, use metatable for access to items. *************** *** 913,917 **** } ! const wxLuaBindEvent* wxLuaBinding::GetEvent(wxEventType eventType_) const { // we've sorted this, see InitBinding() --- 915,919 ---- } ! const wxLuaBindEvent* wxLuaBinding::GetBindEvent(wxEventType eventType_) const { // we've sorted this, see InitBinding() *************** *** 929,938 **** wxString wxLuaBinding::GetEventTypeName(wxEventType eventType) const { ! const wxLuaBindEvent* luaEvent = GetEvent(eventType); return (luaEvent != NULL) ? lua2wx(luaEvent->name) : wxString(); } ! const wxLuaBindClass* wxLuaBinding::GetLuaClass(int class_tag_) const { int class_tag = class_tag_; --- 931,940 ---- wxString wxLuaBinding::GetEventTypeName(wxEventType eventType) const { ! const wxLuaBindEvent* luaEvent = GetBindEvent(eventType); return (luaEvent != NULL) ? lua2wx(luaEvent->name) : wxString(); } ! const wxLuaBindClass* wxLuaBinding::GetBindClass(int class_tag_) const { int class_tag = class_tag_; *************** *** 951,955 **** } ! const wxLuaBindClass* wxLuaBinding::GetLuaClass(const wxLuaBindMethod* wxlMethod) const { wxLuaBindClass* wxlClass_i = m_classArray; --- 953,957 ---- } ! const wxLuaBindClass* wxLuaBinding::GetBindClass(const wxLuaBindMethod* wxlMethod) const { wxLuaBindClass* wxlClass_i = m_classArray; *************** *** 971,975 **** } ! const wxLuaBindClass* wxLuaBinding::GetLuaClass(const wxLuaBindCFunc* wxlMethod_cfunc) const { wxLuaBindClass* wxlClass_i = m_classArray; --- 973,977 ---- } ! const wxLuaBindClass* wxLuaBinding::GetBindClass(const wxLuaBindCFunc* wxlMethod_cfunc) const { wxLuaBindClass* wxlClass_i = m_classArray; *************** *** 998,1001 **** --- 1000,1106 ---- } + // -------------------------------------------------------------------------- + + // static + wxLuaBinding* wxLuaBinding::GetLuaBinding(const wxString& bindingName, const wxLuaBindingList* bindingList_) + { + const wxLuaBindingList* bindingList = bindingList_ ? bindingList_ : &sm_bindingList; + wxLuaBindingList::compatibility_iterator node = bindingList->GetFirst(); + + while (node) + { + wxLuaBinding* binding = node->GetData(); + if (binding->GetBindingName() == bindingName) + return binding; + + node = node->GetNext(); + } + + return NULL; + } + + // static + const wxLuaBindClass* wxLuaBinding::GetBindClass(int class_tag, const wxLuaBindingList* bindingList_) + { + const wxLuaBindingList* bindingList = bindingList_ ? bindingList_ : &sm_bindingList; + wxLuaBindingList::compatibility_iterator node = bindingList->GetFirst(); + + while (node) + { + wxLuaBinding* binding = node->GetData(); + const wxLuaBindClass* wxlClass = binding->GetBindClass(class_tag); + + if (wxlClass) + return wxlClass; + + node = node->GetNext(); + } + + return NULL; + } + + // static + const wxLuaBindClass* wxLuaBinding::GetBindClass(const wxLuaBindMethod* method, const wxLuaBindingList* bindingList_) + { + const wxLuaBindingList* bindingList = bindingList_ ? bindingList_ : &sm_bindingList; + wxLuaBindingList::compatibility_iterator node = bindingList->GetFirst(); + + while (node) + { + wxLuaBinding* binding = node->GetData(); + const wxLuaBindClass *pLuaClass = binding->GetBindClass(method); + + if (pLuaClass) + return pLuaClass; + + node = node->GetNext(); + } + + return NULL; + } + + // static + const wxLuaBindClass* wxLuaBinding::GetBindClass(const wxLuaBindCFunc* method_cfunc, const wxLuaBindingList* bindingList_) + { + const wxLuaBindingList* bindingList = bindingList_ ? bindingList_ : &sm_bindingList; + wxLuaBindingList::compatibility_iterator node = bindingList->GetFirst(); + + while (node) + { + wxLuaBinding* binding = node->GetData(); + const wxLuaBindClass *pLuaClass = binding->GetBindClass(method_cfunc); + + if (pLuaClass) + return pLuaClass; + + node = node->GetNext(); + } + + return NULL; + } + + // static + const wxLuaBindEvent* wxLuaBinding::GetBindEvent(wxEventType eventType_, const wxLuaBindingList* bindingList_) + { + const wxLuaBindingList* bindingList = bindingList_ ? bindingList_ : &sm_bindingList; + wxLuaBindingList::compatibility_iterator node = bindingList->GetFirst(); + + while (node) + { + wxLuaBinding* binding = node->GetData(); + const wxLuaBindEvent *pLuaEvent = binding->GetBindEvent(eventType_); + + if (pLuaEvent) + return pLuaEvent; + + node = node->GetNext(); + } + + return NULL; + } + + // -------------------------------------------------------------------------- + + // static wxLuaBindMethod* wxLuaBinding::GetClassMethod(const wxLuaBindClass *wxlClass, const char *methodName, bool search_baseclasses) { *************** *** 1046,1049 **** --- 1151,1155 ---- } + // static wxLuaBindMethod* wxLuaBinding::GetClassProperty(const wxLuaBindClass *wxlClass, const char *propName, bool isLuaSetProp) { *************** *** 1073,1076 **** --- 1179,1185 ---- } + // -------------------------------------------------------------------------- + + // static void wxLuaBinding::InitAllBindings(bool force_update) { *************** *** 1089,1094 **** if (wxlClass->baseclassName) // does it have a name { ! wxLuaBindingList::compatibility_iterator basenode; ! for (basenode = sm_bindingList.GetFirst(); basenode; basenode = basenode->GetNext() ) { wxLuaBinding* basebinding = basenode->GetData(); --- 1198,1203 ---- if (wxlClass->baseclassName) // does it have a name { ! wxLuaBindingList::compatibility_iterator basenode = sm_bindingList.GetFirst(); ! while (basenode) { wxLuaBinding* basebinding = basenode->GetData(); *************** *** 1097,1100 **** --- 1206,1211 ---- if (basebinding->SetBaseClass(wxlClass)) break; + + basenode = basenode->GetNext(); } } *************** *** 1159,1161 **** sm_bindingList_initialized = true; ! } \ No newline at end of file --- 1270,1272 ---- sm_bindingList_initialized = true; ! } Index: wxlcallb.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlcallb.cpp,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** wxlcallb.cpp 5 Dec 2007 00:34:46 -0000 1.45 --- wxlcallb.cpp 5 Dec 2007 05:54:11 -0000 1.46 *************** *** 36,40 **** wxCHECK_RET(m_wxlState.Ok(), wxT("Invalid wxLuaState")); ! m_wxlBindEvent = wxlState.GetLuaEvent(eventType); m_wxlState.AddTrackedCallback(this); --- 36,40 ---- wxCHECK_RET(m_wxlState.Ok(), wxT("Invalid wxLuaState")); ! m_wxlBindEvent = wxlState.GetBindEvent(eventType); m_wxlState.AddTrackedCallback(this); *************** *** 119,123 **** (event->GetClassInfo()->GetClassName() == wxString(wxT("wxSpinEvent")))) { ! const wxLuaBindClass *wxlClass = wxlState.GetLuaClass("wxSpinEvent"); if (wxlClass != NULL) event_tag = *wxlClass->class_tag; --- 119,123 ---- (event->GetClassInfo()->GetClassName() == wxString(wxT("wxSpinEvent")))) { ! const wxLuaBindClass *wxlClass = wxlState.GetBindClass("wxSpinEvent"); if (wxlClass != NULL) event_tag = *wxlClass->class_tag; *************** *** 240,244 **** lua_rawset(L, -4); // set t[key] = nil to remove it } ! else lua_pop(L, 1); // pop value, lua_next will pop key at end } --- 240,244 ---- lua_rawset(L, -4); // set t[key] = nil to remove it } ! else lua_pop(L, 1); // pop value, lua_next will pop key at end } Index: wxlua_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlua_bind.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** wxlua_bind.cpp 5 Dec 2007 00:34:46 -0000 1.11 --- wxlua_bind.cpp 5 Dec 2007 05:54:11 -0000 1.12 *************** *** 248,252 **** else if (strcmp(idx_str, "class") == 0) { ! const wxLuaBindClass* c = wxlBinding->GetLuaClass(wxlCFunc); if (c != NULL) { --- 248,252 ---- else if (strcmp(idx_str, "class") == 0) { ! const wxLuaBindClass* c = wxlBinding->GetBindClass(wxlCFunc); if (c != NULL) { *************** *** 265,269 **** else if (strcmp(idx_str, "class_name") == 0) { ! const wxLuaBindClass* c = wxlBinding->GetLuaClass(wxlCFunc); if (c != NULL) { --- 265,269 ---- else if (strcmp(idx_str, "class_name") == 0) { ! const wxLuaBindClass* c = wxlBinding->GetBindClass(wxlCFunc); if (c != NULL) { *************** *** 353,357 **** else if (strcmp(idx_str, "class") == 0) { ! const wxLuaBindClass* c = wxlBinding->GetLuaClass(wxlMethod); if (c != NULL) { --- 353,357 ---- else if (strcmp(idx_str, "class") == 0) { ! const wxLuaBindClass* c = wxlBinding->GetBindClass(wxlMethod); if (c != NULL) { *************** *** 370,374 **** else if (strcmp(idx_str, "class_name") == 0) { ! const wxLuaBindClass* c = wxlBinding->GetLuaClass(wxlMethod); if (c != NULL) { --- 370,374 ---- else if (strcmp(idx_str, "class_name") == 0) { ! const wxLuaBindClass* c = wxlBinding->GetBindClass(wxlMethod); if (c != NULL) { *************** *** 450,454 **** if (wxlClass->classInfo) { ! const wxLuaBindClass* classInfoClass = wxlState.GetLuaClass("wxClassInfo"); if (classInfoClass) { --- 450,454 ---- if (wxlClass->classInfo) { ! const wxLuaBindClass* classInfoClass = wxlState.GetBindClass("wxClassInfo"); if (classInfoClass) { |