From: John L. <jr...@us...> - 2009-10-05 02:51:41
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10796/wxLua/modules/wxluadebug/src Modified Files: wxldebug.cpp wxlstack.cpp Log Message: Add a few more wxDateTime member functions. Speedup check for wxSpinEvent vs wxScrollEvent in wxLuaEventCallback::OnEvent() Reorder list of lightuserdata keys for LUA_REGISTRYINDEX in wxlstate.h Cleanup in wxLuaStackDialog, remove EnumerateGlobalData() and just treat is as a regular table. Fix ignoring events for controls in controls.wx.lua Index: wxlstack.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxlstack.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** wxlstack.cpp 11 Jan 2008 00:32:36 -0000 1.30 --- wxlstack.cpp 5 Oct 2009 02:51:29 -0000 1.31 *************** *** 62,65 **** --- 62,66 ---- } + // overridden wxListCtrl virtual functions virtual wxString OnGetItemText(long item, long column) const; virtual int OnGetItemImage(long item) const; *************** *** 529,540 **** FillTableEntry(lc_item, debugData); } - void wxLuaStackDialog::EnumerateGlobalData(long lc_item) - { - wxCHECK_RET(m_wxlState.Ok(), wxT("Invalid wxLuaState")); - wxBusyCursor wait; - wxLuaDebugData debugData(true); - debugData.EnumerateTable(m_wxlState, -1, -1, m_luaReferences); // Get global table - FillTableEntry(lc_item, debugData); - } void wxLuaStackDialog::FillStackCombobox(const wxLuaDebugData& debugData) --- 530,533 ---- *************** *** 589,601 **** if (m_stack_sel == (int)m_stackEntries.GetCount() - 1) { ! EnumerateGlobalData(m_listCtrl->GetItemCount()); // new item, put at end ! ! // for debugging also add the registry ! if (m_wxlState.Ok()) ! { ! wxLuaDebugData regData(true); ! regData.EnumerateTable(m_wxlState, LUA_REGISTRYINDEX, -1, m_luaReferences); // Get global table ! FillTableEntry(m_listCtrl->GetItemCount(), regData); ! } } } --- 582,592 ---- if (m_stack_sel == (int)m_stackEntries.GetCount() - 1) { ! // When used with the wxLuaDebuggerServer we get delayed responses ! // from the debuggee so we can't expect that the item has been added ! // to the listctrl yet, but we assume they eventually will be, hence n+x. ! int n = m_listCtrl->GetItemCount(); ! EnumerateTable(LUA_GLOBALSINDEX, -1, n); ! EnumerateTable(LUA_ENVIRONINDEX, -1, n+1); ! EnumerateTable(LUA_REGISTRYINDEX, -1, n+2); } } *************** *** 819,823 **** // Remaining events we handle are for finding ! bool find_col[5] = { m_findMenu->IsChecked(ID_WXLUA_STACK_FINDMENU_NAME), m_findMenu->IsChecked(ID_WXLUA_STACK_FINDMENU_LEVEL), --- 810,814 ---- // Remaining events we handle are for finding ! bool find_col[LIST_COL__MAX] = { m_findMenu->IsChecked(ID_WXLUA_STACK_FINDMENU_NAME), m_findMenu->IsChecked(ID_WXLUA_STACK_FINDMENU_LEVEL), *************** *** 886,890 **** for ( ; (i >= 0) && (i < list_count) && !found; i = i + direction) { ! for (int col = 0; (col < 5) && !found; ++col) { if (!find_col[col]) continue; --- 877,881 ---- for ( ; (i >= 0) && (i < list_count) && !found; i = i + direction) { ! for (int col = 0; (col < LIST_COL__MAX) && !found; ++col) { if (!find_col[col]) continue; Index: wxldebug.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxldebug.cpp,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** wxldebug.cpp 1 Oct 2009 04:21:02 -0000 1.68 --- wxldebug.cpp 5 Oct 2009 02:51:29 -0000 1.69 *************** *** 289,293 **** wxString name; ! if ((tableRef == -1) || (tableRef == LUA_GLOBALSINDEX)) { lua_pushvalue(L, LUA_GLOBALSINDEX); --- 289,293 ---- wxString name; ! if (tableRef == LUA_GLOBALSINDEX) { lua_pushvalue(L, LUA_GLOBALSINDEX); *************** *** 300,303 **** --- 300,314 ---- Add(new wxLuaDebugItem(wxT("Globals"), WXLUA_TNONE, value, WXLUA_TTABLE, wxT(""), val_ref, 0, flag_type)); } + else if (tableRef == LUA_ENVIRONINDEX) + { + lua_pushvalue(L, LUA_ENVIRONINDEX); + GetTypeValue(wxlState, -1, &wxl_valuetype, value); + + int flag_type = 0; + int val_ref = RefTable(L, -1, &flag_type, WXLUA_DEBUGITEM_VALUE_REF, references); + lua_pop(L, 1); // pop environment table + + Add(new wxLuaDebugItem(wxT("Environment"), WXLUA_TNONE, value, WXLUA_TTABLE, wxT(""), val_ref, 0, flag_type)); + } else if (tableRef == LUA_REGISTRYINDEX) { |