From: John L. <jr...@us...> - 2007-06-28 21:53:00
|
Update of /cvsroot/wxlua/wxLua/samples In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv19412/wxLua/samples Modified Files: bindings.wx.lua Log Message: Moved the bindings function for introspection in lua into the override.hpp file for the wxlua bindings. Add function wxlua.GetBindings() instead of install wxLuaBinding_XXX per binding. Index: bindings.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/bindings.wx.lua,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** bindings.wx.lua 27 Jun 2007 19:56:30 -0000 1.12 --- bindings.wx.lua 28 Jun 2007 21:52:57 -0000 1.13 *************** *** 106,110 **** -- Call DumpBindingInfo(...) on the binding you want to show ! --DumpBindingInfo(wx.wxLuaBinding_wx) -- ---------------------------------------------------------------------------- --- 106,110 ---- -- Call DumpBindingInfo(...) on the binding you want to show ! --DumpBindingInfo(wxlua.GetBindings()[1]) -- ---------------------------------------------------------------------------- *************** *** 146,150 **** -- ["list_item"] = last selected list item or nil if not set ! bindingList = {} -- Table of {"name space", "wxLuaBinding_XXX function"} -- ---------------------------------------------------------------------------- --- 146,150 ---- -- ["list_item"] = last selected list item or nil if not set ! bindingList = wxlua.GetBindings() -- Table of {"name", "namespace", "wxLuaBinding function"} -- ---------------------------------------------------------------------------- *************** *** 155,173 **** -- ---------------------------------------------------------------------------- - -- Find the bindings installed into wxLua, tables that might have wxLuaBinding_ - -- ---------------------------------------------------------------------------- - wxlua_tables = { "wxlua", "wx", "wxstc" } - - for i = 1, #wxlua_tables do - if _G[wxlua_tables[i]] then - for k, v in pairs(_G[wxlua_tables[i]]) do - if string.find(k, "wxLuaBinding_", 1, 1) then - table.insert(bindingList, {wxlua_tables[i], k}) - end - end - end - end - - -- ---------------------------------------------------------------------------- -- Save the current listctrl settings into the listColWidths table -- ---------------------------------------------------------------------------- --- 155,158 ---- *************** *** 763,769 **** GotoBindingLevel(listCtrl, list_level) else ! local binding = _G ! binding = binding[listData[1][data_index][2]] ! binding = binding[listData[1][data_index][1]] listData[2] = { --- 748,752 ---- GotoBindingLevel(listCtrl, list_level) else ! local binding = data[data_index].binding listData[2] = { *************** *** 973,980 **** for b = 1, #bindingList do ! local binding = _G ! for i = 1, #bindingList[b] do ! binding = binding[bindingList[b][i]] ! end local classTable = binding.GetClassArray --- 956,960 ---- for b = 1, #bindingList do ! local binding = bindingList[b].binding local classTable = binding.GetClassArray *************** *** 1071,1078 **** for b = 1, #bindingList do ! local binding = _G ! for i = 1, #bindingList[b] do ! binding = binding[bindingList[b][i]] ! end local classTable = binding.GetClassArray --- 1051,1055 ---- for b = 1, #bindingList do ! local binding = bindingList[b].binding local classTable = binding.GetClassArray *************** *** 1165,1172 **** for b = 1, #bindingList do ! local binding = _G ! for i = 1, #bindingList[b] do ! binding = binding[bindingList[b][i]] ! end local classTable = binding.GetClassArray --- 1142,1146 ---- for b = 1, #bindingList do ! local binding = bindingList[b].binding local classTable = binding.GetClassArray *************** *** 1327,1331 **** -- Add the binding that are installed {"wxLuaBinding_wx", "wx", ["icon"] = list_images.folder }, for i = 1, #bindingList do ! table.insert(listData[1], {bindingList[i][2], bindingList[i][1], ["icon"] = list_images.folder }) end --- 1301,1305 ---- -- Add the binding that are installed {"wxLuaBinding_wx", "wx", ["icon"] = list_images.folder }, for i = 1, #bindingList do ! table.insert(listData[1], { "Binding Name : "..bindingList[i].name, "Namespace : "..bindingList[i].namespace, ["icon"] = list_images.folder, ["binding"] = bindingList[i].binding }) end |