From: John L. <jr...@us...> - 2008-03-05 05:05:03
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv29131/bindings Modified Files: genwxbind.lua Log Message: Make sure we use wxLUA_IMPLEMENT_wxGridCellWorker_ENCAPSULATION for all wxGridCellWorker derived classes. Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.166 retrieving revision 1.167 diff -C2 -d -r1.166 -r1.167 *** genwxbind.lua 31 Jan 2008 04:34:02 -0000 1.166 --- genwxbind.lua 5 Mar 2008 05:04:58 -0000 1.167 *************** *** 439,442 **** --- 439,465 ---- -- --------------------------------------------------------------------------- + -- Returns true if the classname is derived from base_classname + -- --------------------------------------------------------------------------- + + function IsDerivedClass(classname, base_classname) + + if dataTypeTable[classname] == nil then + print("ERROR: dataTypeTable for classname is nil in IsDerivedClass()", classname, base_classname) + return false + end + + if classname == base_classname then + return true + end + + if dataTypeTable[classname].BaseClass then + local c = dataTypeTable[dataTypeTable[classname].BaseClass].Name + return IsDerivedClass(c, base_classname) + end + + return false + end + + -- --------------------------------------------------------------------------- -- Get any conditions for this data type -- --------------------------------------------------------------------------- *************** *** 2729,2734 **** } ! if (parseObject.Name == "wxGridCellWorker") or (parseObject.Name == "wxGridCellEditor") or ! (parseObject.Name == "wxGridCellAttr") then encapsulationBinding.Implementation = "wxLUA_IMPLEMENT_wxGridCellWorker_ENCAPSULATION("..parseObject.Name..", "..MakeVar(parseObject.Name)..")\n" end --- 2752,2757 ---- } ! if IsDerivedClass(parseObject.Name, "wxGridCellWorker") or ! IsDerivedClass(parseObject.Name, "wxGridCellAttr") then encapsulationBinding.Implementation = "wxLUA_IMPLEMENT_wxGridCellWorker_ENCAPSULATION("..parseObject.Name..", "..MakeVar(parseObject.Name)..")\n" end |