From: John L. <jr...@us...> - 2005-11-20 04:09:54
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22114/wxLua/bindings Modified Files: genwxbind.lua Log Message: everything works in wx27/26 the problem was with dialogs.i Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** genwxbind.lua 19 Nov 2005 23:58:48 -0000 1.4 --- genwxbind.lua 20 Nov 2005 04:09:46 -0000 1.5 *************** *** 59,71 **** -- simple function to completely dump the contents of a table ! function DumpTable(atable, prefix) if prefix == nil then prefix = "" end ! print(prefix.."-Dumping Table ", atable) prefix = prefix.." " for k, v in atable do ! print(prefix..k, v) if type(v) == "table" then ! DumpTable(v, prefix.." ") end end --- 59,75 ---- -- simple function to completely dump the contents of a table ! function DumpTable(atable, prefix, tablelevel) if prefix == nil then prefix = "" end ! if tablelevel == nil then tablelevel = "" end ! ! print(prefix.."-Dumping Table "..tablelevel, atable) prefix = prefix.." " + local n = 0 for k, v in atable do ! n = n + 1 ! print(prefix..n, tablelevel.."["..k.."]", v) if type(v) == "table" then ! DumpTable(v, prefix.." ", tablelevel.."["..k.."]") end end *************** *** 1095,1099 **** local fileData = generateHookBuiltinFileTable() ! writeTableToFile(getHeaderFileName(hook_builtin_file), fileData, false) end --- 1099,1103 ---- local fileData = generateHookBuiltinFileTable() ! writeTableToFile(getOutputFileName(hook_builtin_file), fileData, false) end *************** *** 1279,1283 **** table.insert(parseState.ObjectStack, 1, globals) ! local enumType = "" -- FIXME temp fix local lineCount = table.getn(interfaceData) --- 1283,1287 ---- table.insert(parseState.ObjectStack, 1, globals) ! local enumType = "" -- FIXME temp fix to remember named enums local lineCount = table.getn(interfaceData) *************** *** 1362,1366 **** local condition = parseState.ConditionStack[1] ! table.remove(parseState.ConditionStack, 1) break -- we can stop processing line --- 1366,1370 ---- local condition = parseState.ConditionStack[1] ! table.remove(parseState.ConditionStack, 1) -- pop last %if break -- we can stop processing line *************** *** 1801,1805 **** --local member = AllocMember(lineState) --table.insert(parseState.ObjectStack[1].Members, member) - print("HAS lineState.Action DEFINE name", tag) -- FIXME wxICON_QUESTION is here lineState.Action = nil --- 1805,1808 ---- *************** *** 2182,2192 **** elseif lineState.DefType == "define" then - - if (lineState.Name == "wxICON_QUESTION") or (lineState.Name == "wxICONIZE") then -- FIXME wxICON_QUESTION is here - DumpTable(lineState) - DumpTable(parseState.ConditionStack) - print("Condition", GetCondition(parseState.ConditionStack), lineState.Condition) - end - table.insert(parseState.ObjectStack[1].Members, AllocMember(lineState, GetCondition(parseState.ConditionStack))) --- 2185,2188 ---- *************** *** 2241,2254 **** end - - if parseState.ObjectStack[1].Members.DefType == "define" and (parseState.ObjectStack[1].Members.Name == "wxICON_QUESTION") or (parseState.ObjectStack[1].Members.Name == "wxICONIZE") then - DumpTable(parseState.ObjectStack[1].Members, "HAPPY!") - end - - -- pop builtin (globals) parseObject table.insert(objectList, 1, parseState.ObjectStack[1]) table.remove(parseState.ObjectStack, 1) return objectList end --- 2237,2249 ---- end -- pop builtin (globals) parseObject table.insert(objectList, 1, parseState.ObjectStack[1]) table.remove(parseState.ObjectStack, 1) + if table.getn(parseState.ObjectStack) ~= 0 then + print("parseState.ObjectStack should be empty, has "..table.getn(parseState.ObjectStack).." items left.") + DumpTable(parseState.ObjectStack) + end + return objectList end *************** *** 2344,2349 **** local member = parseObject.Members[m] - print("GenerateLuaLanguageBinding MEMBERNAME", member.Name) -- FIXME wxICON_QUESTION is gone - local fullcondition = AddCondition(member.Condition, member.ExtraCondition) --- 2339,2342 ---- *************** *** 2624,2629 **** defineBindingTable[fullcondition][member.Name] = defineBinding - print("Define BINDING", defineBinding.Map) -- FIXME wxICON_QUESTION is gone - -- Define Includes for condition, includeBindingList in interface.includeBindingTable do --- 2617,2620 ---- *************** *** 3781,3784 **** --- 3772,3779 ---- table.insert(fileData, " static WXLUADEFINE defineList[] =\n {\n") + table.insert(fileData, "// ----------------------------------------------------------------------------\n") + table.insert(fileData, "// %define\n") + table.insert(fileData, "// ----------------------------------------------------------------------------\n") + for condition, defineBindingList in defineBindingTable do if (condition ~= nil) and (condition ~= "n") and (condition ~= "") and defineBindingList then *************** *** 3797,3802 **** end for condition, stringBindingList in stringBindingTable do ! if (condition ~= nil) and (condition ~= "n") and (condition ~= "") and defineBindingList then if condition ~= "1" then table.insert(fileData, "\n#if "..condition.."\n") --- 3792,3801 ---- end + table.insert(fileData, "// ----------------------------------------------------------------------------\n") + table.insert(fileData, "// %define %string\n") + table.insert(fileData, "// ----------------------------------------------------------------------------\n") + for condition, stringBindingList in stringBindingTable do ! if (condition ~= nil) and (condition ~= "n") and (condition ~= "") and stringBindingList then if condition ~= "1" then table.insert(fileData, "\n#if "..condition.."\n") *************** *** 3813,3818 **** end for condition, enumBindingList in enumBindingTable do ! if (condition ~= nil) and (condition ~= "n") and (condition ~= "") and defineBindingList then if condition ~= "1" then table.insert(fileData, "\n#if "..condition.."\n") --- 3812,3821 ---- end + table.insert(fileData, "// ----------------------------------------------------------------------------\n") + table.insert(fileData, "// %enum\n") + table.insert(fileData, "// ----------------------------------------------------------------------------\n") + for condition, enumBindingList in enumBindingTable do ! if (condition ~= nil) and (condition ~= "n") and (condition ~= "") and enumBindingList then if condition ~= "1" then table.insert(fileData, "\n#if "..condition.."\n") |