Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv4216/wxLua/modules/wxbind/src Modified Files: appframe.cpp clipdrag.cpp controls.cpp data.cpp datetime.cpp defsutil.cpp dialogs.cpp event.cpp file.cpp gdi.cpp grid.cpp help.cpp html.cpp image.cpp mdi.cpp menutool.cpp print.cpp sizer.cpp socket.cpp wave.cpp windows.cpp wx_bind.cpp wxlprint.cpp wxlua.cpp xml.cpp Log Message: Change wxLuaState::AddTrackedWindow to take a wxObject and figure out inside if it's a window Change the nomenclature "enum" to "integer" as the integer data type Change "base_"XXX to "_"XXX for base class function calls Add a test function to wxLuaPrintout to really check if virtual functions work More fixes to samples for binding changes Index: xml.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/xml.cpp,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** xml.cpp 8 Jun 2007 01:36:30 -0000 1.35 --- xml.cpp 12 Jun 2007 00:08:41 -0000 1.36 *************** *** 460,464 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlNode_SetType[] = { &s_wxluatag_wxXmlNode, &s_wxluaarg_Enum, NULL }; static int LUACALL wxLua_wxXmlNode_SetType(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlNode_SetType[1] = {{ wxLua_wxXmlNode_SetType, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxXmlNode_SetType }}; --- 460,464 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlNode_SetType[] = { &s_wxluatag_wxXmlNode, &s_wxluaarg_Integer, NULL }; static int LUACALL wxLua_wxXmlNode_SetType(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlNode_SetType[1] = {{ wxLua_wxXmlNode_SetType, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxXmlNode_SetType }}; *************** *** 468,472 **** wxLuaState wxlState(L); // wxXmlNodeType type ! wxXmlNodeType type = (wxXmlNodeType)wxlua_getenumerationtype(L, 2); // get this wxXmlNode * self = (wxXmlNode *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlNode); --- 468,472 ---- wxLuaState wxlState(L); // wxXmlNodeType type ! wxXmlNodeType type = (wxXmlNodeType)wxlua_getintegertype(L, 2); // get this wxXmlNode * self = (wxXmlNode *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlNode); *************** *** 477,481 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlNode_constructor2[] = { &s_wxluatag_wxXmlNode, &s_wxluaarg_Enum, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluatag_wxXmlProperty, &s_wxluatag_wxXmlNode, NULL }; static int LUACALL wxLua_wxXmlNode_constructor2(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlNode_constructor2[1] = {{ wxLua_wxXmlNode_constructor2, WXLUAMETHOD_CONSTRUCTOR, 6, 6, s_wxluatagArray_wxLua_wxXmlNode_constructor2 }}; --- 477,481 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlNode_constructor2[] = { &s_wxluatag_wxXmlNode, &s_wxluaarg_Integer, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluatag_wxXmlProperty, &s_wxluatag_wxXmlNode, NULL }; static int LUACALL wxLua_wxXmlNode_constructor2(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlNode_constructor2[1] = {{ wxLua_wxXmlNode_constructor2, WXLUAMETHOD_CONSTRUCTOR, 6, 6, s_wxluatagArray_wxLua_wxXmlNode_constructor2 }}; *************** *** 495,499 **** const wxString name = wxlState.GetwxStringType(3); // wxXmlNodeType type ! wxXmlNodeType type = (wxXmlNodeType)wxlua_getenumerationtype(L, 2); // wxXmlNode parent wxXmlNode * parent = (wxXmlNode *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlNode); --- 495,499 ---- const wxString name = wxlState.GetwxStringType(3); // wxXmlNodeType type ! wxXmlNodeType type = (wxXmlNodeType)wxlua_getintegertype(L, 2); // wxXmlNode parent wxXmlNode * parent = (wxXmlNode *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlNode); *************** *** 508,512 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlNode_constructor1[] = { &s_wxluaarg_Enum, &s_wxluaarg_String, &s_wxluaarg_String, NULL }; static int LUACALL wxLua_wxXmlNode_constructor1(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlNode_constructor1[1] = {{ wxLua_wxXmlNode_constructor1, WXLUAMETHOD_CONSTRUCTOR, 2, 3, s_wxluatagArray_wxLua_wxXmlNode_constructor1 }}; --- 508,512 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxXmlNode_constructor1[] = { &s_wxluaarg_Integer, &s_wxluaarg_String, &s_wxluaarg_String, NULL }; static int LUACALL wxLua_wxXmlNode_constructor1(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxXmlNode_constructor1[1] = {{ wxLua_wxXmlNode_constructor1, WXLUAMETHOD_CONSTRUCTOR, 2, 3, s_wxluatagArray_wxLua_wxXmlNode_constructor1 }}; *************** *** 524,528 **** const wxString name = wxlState.GetwxStringType(2); // wxXmlNodeType type ! wxXmlNodeType type = (wxXmlNodeType)wxlua_getenumerationtype(L, 1); // call constructor returns = new wxXmlNode(type, name, content); --- 524,528 ---- const wxString name = wxlState.GetwxStringType(2); // wxXmlNodeType type ! wxXmlNodeType type = (wxXmlNodeType)wxlua_getintegertype(L, 1); // call constructor returns = new wxXmlNode(type, name, content); *************** *** 1082,1086 **** returns = new wxXmlDocument(filename, encoding); // add to tracked memory list ! wxlState.AddTrackedObject((wxXmlDocument *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXmlDocument, returns); --- 1082,1086 ---- returns = new wxXmlDocument(filename, encoding); // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXmlDocument, returns); *************** *** 1100,1104 **** returns = new wxXmlDocument(); // add to tracked memory list ! wxlState.AddTrackedObject((wxXmlDocument *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXmlDocument, returns); --- 1100,1104 ---- returns = new wxXmlDocument(); // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXmlDocument, returns); *************** *** 1761,1765 **** returns = new wxXmlResource(filemask, flags); // add to tracked memory list ! wxlState.AddTrackedObject((wxXmlResource *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXmlResource, returns); --- 1761,1765 ---- returns = new wxXmlResource(filemask, flags); // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXmlResource, returns); *************** *** 1784,1788 **** returns = new wxXmlResource(flags); // add to tracked memory list ! wxlState.AddTrackedObject((wxXmlResource *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXmlResource, returns); --- 1784,1788 ---- returns = new wxXmlResource(flags); // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXmlResource, returns); Index: defsutil.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/defsutil.cpp,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** defsutil.cpp 8 Jun 2007 01:36:25 -0000 1.37 --- defsutil.cpp 12 Jun 2007 00:08:38 -0000 1.38 *************** *** 234,238 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxProcess_Kill[] = { &s_wxluaarg_Number, &s_wxluaarg_Enum, &s_wxluaarg_Number, NULL }; static int LUACALL wxLua_wxProcess_Kill(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxProcess_Kill[1] = {{ wxLua_wxProcess_Kill, WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, 1, 3, s_wxluatagArray_wxLua_wxProcess_Kill }}; --- 234,238 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxProcess_Kill[] = { &s_wxluaarg_Number, &s_wxluaarg_Integer, &s_wxluaarg_Number, NULL }; static int LUACALL wxLua_wxProcess_Kill(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxProcess_Kill[1] = {{ wxLua_wxProcess_Kill, WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, 1, 3, s_wxluatagArray_wxLua_wxProcess_Kill }}; *************** *** 246,250 **** int flags = (argCount >= 3 ? (int)wxlua_getnumbertype(L, 3) : wxKILL_NOCHILDREN); // wxSignal sig = wxSIGTERM ! wxSignal sig = (argCount >= 2 ? (wxSignal)wxlua_getenumerationtype(L, 2) : wxSIGTERM); // int pid int pid = (int)wxlua_getnumbertype(L, 1); --- 246,250 ---- int flags = (argCount >= 3 ? (int)wxlua_getnumbertype(L, 3) : wxKILL_NOCHILDREN); // wxSignal sig = wxSIGTERM ! wxSignal sig = (argCount >= 2 ? (wxSignal)wxlua_getintegertype(L, 2) : wxSIGTERM); // int pid int pid = (int)wxlua_getnumbertype(L, 1); *************** *** 913,917 **** returns = new wxBusyInfo(message, parent); // add to tracked memory list ! wxlState.AddTrackedObject((wxBusyInfo *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxBusyInfo, returns); --- 913,917 ---- returns = new wxBusyInfo(message, parent); // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxBusyInfo, returns); Index: wxlua.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxlua.cpp,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** wxlua.cpp 11 Jun 2007 03:58:07 -0000 1.40 --- wxlua.cpp 12 Jun 2007 00:08:41 -0000 1.41 *************** *** 119,123 **** ! static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaObject_HasAllocationFlag[] = { &s_wxluatag_wxLuaObject, &s_wxluaarg_Enum, NULL }; static int LUACALL wxLua_wxLuaObject_HasAllocationFlag(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaObject_HasAllocationFlag[1] = {{ wxLua_wxLuaObject_HasAllocationFlag, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxLuaObject_HasAllocationFlag }}; --- 119,123 ---- ! static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaObject_HasAllocationFlag[] = { &s_wxluatag_wxLuaObject, &s_wxluaarg_Integer, NULL }; static int LUACALL wxLua_wxLuaObject_HasAllocationFlag(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaObject_HasAllocationFlag[1] = {{ wxLua_wxLuaObject_HasAllocationFlag, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxLuaObject_HasAllocationFlag }}; *************** *** 128,132 **** bool returns; // wxLuaObject_Type flag ! wxLuaObject_Type flag = (wxLuaObject_Type)wxlua_getenumerationtype(L, 2); // get this wxLuaObject * self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); --- 128,132 ---- bool returns; // wxLuaObject_Type flag ! wxLuaObject_Type flag = (wxLuaObject_Type)wxlua_getintegertype(L, 2); // get this wxLuaObject * self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); *************** *** 139,164 **** } - static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaObject_SetAllocationFlag[] = { &s_wxluatag_wxLuaObject, &s_wxluaarg_Enum, &s_wxluaarg_Boolean, NULL }; - static int LUACALL wxLua_wxLuaObject_SetAllocationFlag(lua_State *L); - static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaObject_SetAllocationFlag[1] = {{ wxLua_wxLuaObject_SetAllocationFlag, WXLUAMETHOD_METHOD, 3, 3, s_wxluatagArray_wxLua_wxLuaObject_SetAllocationFlag }}; - // int SetAllocationFlag(wxLuaObject_Type flag, bool set) - static int LUACALL wxLua_wxLuaObject_SetAllocationFlag(lua_State *L) - { - wxLuaState wxlState(L); - int returns; - // bool set - bool set = wxlua_getbooleantype(L, 3); - // wxLuaObject_Type flag - wxLuaObject_Type flag = (wxLuaObject_Type)wxlua_getenumerationtype(L, 2); - // get this - wxLuaObject * self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); - // call SetAllocationFlag - returns = self->SetAllocationFlag(flag, set); - // push the result number - lua_pushnumber(L, returns); - - return 1; - } - static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaObject_SetObject[] = { &s_wxluatag_wxLuaObject, NULL }; static int LUACALL wxLua_wxLuaObject_SetObject(lua_State *L); --- 139,142 ---- *************** *** 206,210 **** { "GetObject", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaObject_GetObject, 1, NULL }, { "HasAllocationFlag", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaObject_HasAllocationFlag, 1, NULL }, - { "SetAllocationFlag", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaObject_SetAllocationFlag, 1, NULL }, { "SetObject", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaObject_SetObject, 1, NULL }, { "wxLuaObject", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxLuaObject_constructor, 1, NULL }, --- 184,187 ---- *************** *** 283,286 **** --- 260,283 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaPrintout_TestVirtualFunctionBinding[] = { &s_wxluatag_wxLuaPrintout, &s_wxluaarg_String, NULL }; + static int LUACALL wxLua_wxLuaPrintout_TestVirtualFunctionBinding(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxLuaPrintout_TestVirtualFunctionBinding[1] = {{ wxLua_wxLuaPrintout_TestVirtualFunctionBinding, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxLuaPrintout_TestVirtualFunctionBinding }}; + // virtual wxString TestVirtualFunctionBinding(const wxString& val) // { return val + wxT("-Base"); } + static int LUACALL wxLua_wxLuaPrintout_TestVirtualFunctionBinding(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // const wxString val + const wxString val = wxlState.GetwxStringType(2); + // get this + wxLuaPrintout * self = (wxLuaPrintout *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaPrintout); + // call TestVirtualFunctionBinding + returns = self->TestVirtualFunctionBinding(val); + // push the result string + wxlState.lua_PushString(returns); + + return 1; + } + static wxLuaArgTag s_wxluatagArray_wxLua_wxLuaPrintout_constructor[] = { &s_wxluaarg_String, &s_wxluatag_wxLuaObject, NULL }; static int LUACALL wxLua_wxLuaPrintout_constructor(lua_State *L); *************** *** 318,321 **** --- 315,319 ---- { "GetID", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaPrintout_GetID, 1, NULL }, { "SetPageInfo", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaPrintout_SetPageInfo, 1, NULL }, + { "TestVirtualFunctionBinding", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxLuaPrintout_TestVirtualFunctionBinding, 1, NULL }, { "wxLuaPrintout", WXLUAMETHOD_CONSTRUCTOR, s_wxluafunc_wxLua_wxLuaPrintout_constructor, 1, NULL }, Index: image.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/image.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** image.cpp 8 Jun 2007 03:40:51 -0000 1.41 --- image.cpp 12 Jun 2007 00:08:39 -0000 1.42 *************** *** 1831,1835 **** returns = new wxImage(name, type); // add to tracked memory list ! wxlState.AddTrackedObject((wxImage *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 1831,1835 ---- returns = new wxImage(name, type); // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 1858,1862 **** returns = new wxImage(width, height, clear); // add to tracked memory list ! wxlState.AddTrackedObject((wxImage *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 1858,1862 ---- returns = new wxImage(width, height, clear); // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 1879,1883 **** returns = new wxImage(*image); // add to tracked memory list ! wxlState.AddTrackedObject((wxImage *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 1879,1883 ---- returns = new wxImage(*image); // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 1897,1901 **** returns = new wxImage(); // add to tracked memory list ! wxlState.AddTrackedObject((wxImage *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 1897,1901 ---- returns = new wxImage(); // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 3050,3056 **** // call constructor returns = new wxBMPHandler(); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxBMPHandler, returns); --- 3050,3055 ---- // call constructor returns = new wxBMPHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxBMPHandler, returns); *************** *** 3092,3098 **** // call constructor returns = new wxICOHandler(); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxICOHandler, returns); --- 3091,3096 ---- // call constructor returns = new wxICOHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxICOHandler, returns); *************** *** 3134,3140 **** // call constructor returns = new wxCURHandler(); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxCURHandler, returns); --- 3132,3137 ---- // call constructor returns = new wxCURHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxCURHandler, returns); *************** *** 3176,3182 **** // call constructor returns = new wxANIHandler(); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxANIHandler, returns); --- 3173,3178 ---- // call constructor returns = new wxANIHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxANIHandler, returns); *************** *** 3218,3224 **** // call constructor returns = new wxIFFHandler(); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxIFFHandler, returns); --- 3214,3219 ---- // call constructor returns = new wxIFFHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxIFFHandler, returns); *************** *** 3260,3266 **** // call constructor returns = new wxGIFHandler(); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxGIFHandler, returns); --- 3255,3260 ---- // call constructor returns = new wxGIFHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxGIFHandler, returns); *************** *** 3302,3308 **** // call constructor returns = new wxJPEGHandler(); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxJPEGHandler, returns); --- 3296,3301 ---- // call constructor returns = new wxJPEGHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxJPEGHandler, returns); *************** *** 3344,3350 **** // call constructor returns = new wxPCXHandler(); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxPCXHandler, returns); --- 3337,3342 ---- // call constructor returns = new wxPCXHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxPCXHandler, returns); *************** *** 3386,3392 **** // call constructor returns = new wxPNGHandler(); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxPNGHandler, returns); --- 3378,3383 ---- // call constructor returns = new wxPNGHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxPNGHandler, returns); *************** *** 3428,3434 **** // call constructor returns = new wxPNMHandler(); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxPNMHandler, returns); --- 3419,3424 ---- // call constructor returns = new wxPNMHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxPNMHandler, returns); *************** *** 3470,3476 **** // call constructor returns = new wxTIFFHandler(); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxTIFFHandler, returns); --- 3460,3465 ---- // call constructor returns = new wxTIFFHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxTIFFHandler, returns); *************** *** 3512,3518 **** // call constructor returns = new wxTGAHandler(); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxTGAHandler, returns); --- 3501,3506 ---- // call constructor returns = new wxTGAHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxTGAHandler, returns); *************** *** 3554,3560 **** // call constructor returns = new wxXPMHandler(); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXPMHandler, returns); --- 3542,3547 ---- // call constructor returns = new wxXPMHandler(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXPMHandler, returns); Index: mdi.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/mdi.cpp,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** mdi.cpp 8 Jun 2007 01:36:27 -0000 1.37 --- mdi.cpp 12 Jun 2007 00:08:39 -0000 1.38 *************** *** 269,273 **** #endif // ((defined(__WXMSW__)) && (wxLUA_USE_MDI && wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE)) && (wxLUA_USE_wxMenu && wxUSE_MENUS) ! static wxLuaArgTag s_wxluatagArray_wxLua_wxMDIParentFrame_Tile[] = { &s_wxluatag_wxMDIParentFrame, &s_wxluaarg_Enum, NULL }; static int LUACALL wxLua_wxMDIParentFrame_Tile(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxMDIParentFrame_Tile[1] = {{ wxLua_wxMDIParentFrame_Tile, WXLUAMETHOD_METHOD, 1, 2, s_wxluatagArray_wxLua_wxMDIParentFrame_Tile }}; --- 269,273 ---- #endif // ((defined(__WXMSW__)) && (wxLUA_USE_MDI && wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE)) && (wxLUA_USE_wxMenu && wxUSE_MENUS) ! static wxLuaArgTag s_wxluatagArray_wxLua_wxMDIParentFrame_Tile[] = { &s_wxluatag_wxMDIParentFrame, &s_wxluaarg_Integer, NULL }; static int LUACALL wxLua_wxMDIParentFrame_Tile(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxMDIParentFrame_Tile[1] = {{ wxLua_wxMDIParentFrame_Tile, WXLUAMETHOD_METHOD, 1, 2, s_wxluatagArray_wxLua_wxMDIParentFrame_Tile }}; *************** *** 279,283 **** int argCount = lua_gettop(L); // wxOrientation orient = wxHORIZONTAL ! wxOrientation orient = (argCount >= 2 ? (wxOrientation)wxlua_getenumerationtype(L, 2) : wxHORIZONTAL); // get this wxMDIParentFrame * self = (wxMDIParentFrame *)wxlState.GetUserDataType(1, s_wxluatag_wxMDIParentFrame); --- 279,283 ---- int argCount = lua_gettop(L); // wxOrientation orient = wxHORIZONTAL ! wxOrientation orient = (argCount >= 2 ? (wxOrientation)wxlua_getintegertype(L, 2) : wxHORIZONTAL); // get this wxMDIParentFrame * self = (wxMDIParentFrame *)wxlState.GetUserDataType(1, s_wxluatag_wxMDIParentFrame); *************** *** 317,323 **** // call constructor returns = new wxMDIParentFrame(parent, id, title, *pos, *size, style, name); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxMDIParentFrame, returns); --- 317,322 ---- // call constructor returns = new wxMDIParentFrame(parent, id, title, *pos, *size, style, name); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxMDIParentFrame, returns); *************** *** 338,344 **** // call constructor returns = new wxMDIParentFrame(); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxMDIParentFrame, returns); --- 337,342 ---- // call constructor returns = new wxMDIParentFrame(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxMDIParentFrame, returns); *************** *** 537,543 **** // call constructor returns = new wxMDIChildFrame(parent, id, title, *pos, *size, style, name); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxMDIChildFrame, returns); --- 535,540 ---- // call constructor returns = new wxMDIChildFrame(parent, id, title, *pos, *size, style, name); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxMDIChildFrame, returns); *************** *** 558,564 **** // call constructor returns = new wxMDIChildFrame(); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxMDIChildFrame, returns); --- 555,560 ---- // call constructor returns = new wxMDIChildFrame(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxMDIChildFrame, returns); *************** *** 730,736 **** // call constructor returns = new wxDocChildFrame(doc, view, parent, id, title, *pos, *size, style, name); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxDocChildFrame, returns); --- 726,731 ---- // call constructor returns = new wxDocChildFrame(doc, view, parent, id, title, *pos, *size, style, name); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxDocChildFrame, returns); *************** *** 1522,1528 **** // call constructor returns = new wxDocManager(flags, initialize); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxDocManager, returns); --- 1517,1522 ---- // call constructor returns = new wxDocManager(flags, initialize); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxDocManager, returns); *************** *** 1709,1715 **** // call constructor returns = new wxDocParentFrame(manager, parent, id, title, *pos, *size, style, name); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxDocParentFrame, returns); --- 1703,1708 ---- // call constructor returns = new wxDocParentFrame(manager, parent, id, title, *pos, *size, style, name); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxDocParentFrame, returns); *************** *** 2117,2123 **** // call constructor returns = new wxDocTemplate(manager, descr, filter, dir, ext, docTypeName, viewTypeName, docClassInfo, viewClassInfo, flags); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxDocTemplate, returns); --- 2110,2115 ---- // call constructor returns = new wxDocTemplate(manager, descr, filter, dir, ext, docTypeName, viewTypeName, docClassInfo, viewClassInfo, flags); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxDocTemplate, returns); *************** *** 2792,2798 **** // call constructor returns = new wxDocument(); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxDocument, returns); --- 2784,2789 ---- // call constructor returns = new wxDocument(); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxDocument, returns); *************** *** 3628,3634 **** // call constructor returns = new wxCommandProcessor(maxCommands); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxCommandProcessor, returns); --- 3619,3624 ---- // call constructor returns = new wxCommandProcessor(maxCommands); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxCommandProcessor, returns); *************** *** 4017,4023 **** // call constructor returns = new wxFileHistory(maxFiles, idBase); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxFileHistory, returns); --- 4007,4012 ---- // call constructor returns = new wxFileHistory(maxFiles, idBase); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxFileHistory, returns); Index: wxlprint.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxlprint.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** wxlprint.cpp 11 Jun 2007 03:58:07 -0000 1.17 --- wxlprint.cpp 12 Jun 2007 00:08:41 -0000 1.18 *************** *** 244,246 **** --- 244,268 ---- } + wxString wxLuaPrintout::TestVirtualFunctionBinding(const wxString& val) + { + wxString result(val + wxT("-Base")); + + if (m_wxlState.Ok() && !m_wxlState.GetCallBaseClassFunction() && + m_wxlState.HasDerivedMethod(this, "TestVirtualFunctionBinding", true)) + { + int nOldTop = m_wxlState.lua_GetTop(); + m_wxlState.tpushusertag(this, s_wxluatag_wxLuaPrintout); + m_wxlState.lua_PushString(val); + + m_wxlState.LuaPCall(2, 1); + result = m_wxlState.GetwxStringType(-1); + m_wxlState.lua_SetTop(nOldTop); + } + // no else since wxPrintout doesn't have this function + + m_wxlState.SetCallBaseClassFunction(false); // clear flag always + + return result; + } + #endif // wxLUA_USE_wxLuaPrintout Index: grid.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/grid.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** grid.cpp 11 Jun 2007 03:58:04 -0000 1.39 --- grid.cpp 12 Jun 2007 00:08:39 -0000 1.40 *************** *** 1726,1730 **** #endif // (wxLUA_USE_wxFont) && (wxLUA_USE_wxGrid && wxUSE_GRID) ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGridCellAttr_SetKind[] = { &s_wxluatag_wxGridCellAttr, &s_wxluaarg_Enum, NULL }; static int LUACALL wxLua_wxGridCellAttr_SetKind(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridCellAttr_SetKind[1] = {{ wxLua_wxGridCellAttr_SetKind, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxGridCellAttr_SetKind }}; --- 1726,1730 ---- #endif // (wxLUA_USE_wxFont) && (wxLUA_USE_wxGrid && wxUSE_GRID) ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGridCellAttr_SetKind[] = { &s_wxluatag_wxGridCellAttr, &s_wxluaarg_Integer, NULL }; static int LUACALL wxLua_wxGridCellAttr_SetKind(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridCellAttr_SetKind[1] = {{ wxLua_wxGridCellAttr_SetKind, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxGridCellAttr_SetKind }}; *************** *** 1734,1738 **** wxLuaState wxlState(L); // wxGridCellAttr::wxAttrKind kind ! wxGridCellAttr::wxAttrKind kind = (wxGridCellAttr::wxAttrKind)wxlua_getenumerationtype(L, 2); // get this wxGridCellAttr * self = (wxGridCellAttr *)wxlState.GetUserDataType(1, s_wxluatag_wxGridCellAttr); --- 1734,1738 ---- wxLuaState wxlState(L); // wxGridCellAttr::wxAttrKind kind ! wxGridCellAttr::wxAttrKind kind = (wxGridCellAttr::wxAttrKind)wxlua_getintegertype(L, 2); // get this wxGridCellAttr * self = (wxGridCellAttr *)wxlState.GetUserDataType(1, s_wxluatag_wxGridCellAttr); *************** *** 2002,2006 **** int s_wxluatag_wxGridCellAttrProvider = -1; ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGridCellAttrProvider_GetAttr[] = { &s_wxluatag_wxGridCellAttrProvider, &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Enum, NULL }; static int LUACALL wxLua_wxGridCellAttrProvider_GetAttr(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridCellAttrProvider_GetAttr[1] = {{ wxLua_wxGridCellAttrProvider_GetAttr, WXLUAMETHOD_METHOD, 4, 4, s_wxluatagArray_wxLua_wxGridCellAttrProvider_GetAttr }}; --- 2002,2006 ---- int s_wxluatag_wxGridCellAttrProvider = -1; ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGridCellAttrProvider_GetAttr[] = { &s_wxluatag_wxGridCellAttrProvider, &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Integer, NULL }; static int LUACALL wxLua_wxGridCellAttrProvider_GetAttr(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridCellAttrProvider_GetAttr[1] = {{ wxLua_wxGridCellAttrProvider_GetAttr, WXLUAMETHOD_METHOD, 4, 4, s_wxluatagArray_wxLua_wxGridCellAttrProvider_GetAttr }}; *************** *** 2011,2015 **** wxGridCellAttr *returns; // wxGridCellAttr::wxAttrKind kind ! wxGridCellAttr::wxAttrKind kind = (wxGridCellAttr::wxAttrKind)wxlua_getenumerationtype(L, 4); // int col int col = (int)wxlua_getnumbertype(L, 3); --- 2011,2015 ---- wxGridCellAttr *returns; // wxGridCellAttr::wxAttrKind kind ! wxGridCellAttr::wxAttrKind kind = (wxGridCellAttr::wxAttrKind)wxlua_getintegertype(L, 4); // int col int col = (int)wxlua_getnumbertype(L, 3); *************** *** 2341,2345 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGridTableBase_GetAttr[] = { &s_wxluatag_wxGridTableBase, &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Enum, NULL }; static int LUACALL wxLua_wxGridTableBase_GetAttr(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridTableBase_GetAttr[1] = {{ wxLua_wxGridTableBase_GetAttr, WXLUAMETHOD_METHOD, 4, 4, s_wxluatagArray_wxLua_wxGridTableBase_GetAttr }}; --- 2341,2345 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGridTableBase_GetAttr[] = { &s_wxluatag_wxGridTableBase, &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Integer, NULL }; static int LUACALL wxLua_wxGridTableBase_GetAttr(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxGridTableBase_GetAttr[1] = {{ wxLua_wxGridTableBase_GetAttr, WXLUAMETHOD_METHOD, 4, 4, s_wxluatagArray_wxLua_wxGridTableBase_GetAttr }}; *************** *** 2350,2354 **** wxGridCellAttr *returns; // wxGridCellAttr::wxAttrKind kind ! wxGridCellAttr::wxAttrKind kind = (wxGridCellAttr::wxAttrKind)wxlua_getenumerationtype(L, 4); // int col int col = (int)wxlua_getnumbertype(L, 3); --- 2350,2354 ---- wxGridCellAttr *returns; // wxGridCellAttr::wxAttrKind kind ! wxGridCellAttr::wxAttrKind kind = (wxGridCellAttr::wxAttrKind)wxlua_getintegertype(L, 4); // int col int col = (int)wxlua_getnumbertype(L, 3); *************** *** 2945,2951 **** // call constructor returns = new wxGridStringTable(numRows, numCols); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxGridStringTable, returns); --- 2945,2950 ---- // call constructor returns = new wxGridStringTable(numRows, numCols); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxGridStringTable, returns); *************** *** 3728,3732 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGrid_CreateGrid[] = { &s_wxluatag_wxGrid, &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Enum, NULL }; static int LUACALL wxLua_wxGrid_CreateGrid(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxGrid_CreateGrid[1] = {{ wxLua_wxGrid_CreateGrid, WXLUAMETHOD_METHOD, 3, 4, s_wxluatagArray_wxLua_wxGrid_CreateGrid }}; --- 3727,3731 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGrid_CreateGrid[] = { &s_wxluatag_wxGrid, &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Integer, NULL }; static int LUACALL wxLua_wxGrid_CreateGrid(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxGrid_CreateGrid[1] = {{ wxLua_wxGrid_CreateGrid, WXLUAMETHOD_METHOD, 3, 4, s_wxluatagArray_wxLua_wxGrid_CreateGrid }}; *************** *** 3739,3743 **** int argCount = lua_gettop(L); // wxGrid::wxGridSelectionModes selmode = wxGrid::wxGridSelectCells ! wxGrid::wxGridSelectionModes selmode = (argCount >= 4 ? (wxGrid::wxGridSelectionModes)wxlua_getenumerationtype(L, 4) : wxGrid::wxGridSelectCells); // int numCols int numCols = (int)wxlua_getnumbertype(L, 3); --- 3738,3742 ---- int argCount = lua_gettop(L); // wxGrid::wxGridSelectionModes selmode = wxGrid::wxGridSelectCells ! wxGrid::wxGridSelectionModes selmode = (argCount >= 4 ? (wxGrid::wxGridSelectionModes)wxlua_getintegertype(L, 4) : wxGrid::wxGridSelectCells); // int numCols int numCols = (int)wxlua_getnumbertype(L, 3); *************** *** 6893,6897 **** #endif // (wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxGrid && wxUSE_GRID) ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGrid_SetSelectionMode[] = { &s_wxluatag_wxGrid, &s_wxluaarg_Enum, NULL }; static int LUACALL wxLua_wxGrid_SetSelectionMode(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxGrid_SetSelectionMode[1] = {{ wxLua_wxGrid_SetSelectionMode, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxGrid_SetSelectionMode }}; --- 6892,6896 ---- #endif // (wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxGrid && wxUSE_GRID) ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGrid_SetSelectionMode[] = { &s_wxluatag_wxGrid, &s_wxluaarg_Integer, NULL }; static int LUACALL wxLua_wxGrid_SetSelectionMode(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxGrid_SetSelectionMode[1] = {{ wxLua_wxGrid_SetSelectionMode, WXLUAMETHOD_METHOD, 2, 2, s_wxluatagArray_wxLua_wxGrid_SetSelectionMode }}; *************** *** 6901,6905 **** wxLuaState wxlState(L); // wxGrid::wxGridSelectionModes selmode ! wxGrid::wxGridSelectionModes selmode = (wxGrid::wxGridSelectionModes)wxlua_getenumerationtype(L, 2); // get this wxGrid * self = (wxGrid *)wxlState.GetUserDataType(1, s_wxluatag_wxGrid); --- 6900,6904 ---- wxLuaState wxlState(L); // wxGrid::wxGridSelectionModes selmode ! wxGrid::wxGridSelectionModes selmode = (wxGrid::wxGridSelectionModes)wxlua_getintegertype(L, 2); // get this wxGrid * self = (wxGrid *)wxlState.GetUserDataType(1, s_wxluatag_wxGrid); *************** *** 6910,6914 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGrid_SetTable[] = { &s_wxluatag_wxGrid, &s_wxluatag_wxGridTableBase, &s_wxluaarg_Boolean, &s_wxluaarg_Enum, NULL }; static int LUACALL wxLua_wxGrid_SetTable(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxGrid_SetTable[1] = {{ wxLua_wxGrid_SetTable, WXLUAMETHOD_METHOD, 2, 4, s_wxluatagArray_wxLua_wxGrid_SetTable }}; --- 6909,6913 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxGrid_SetTable[] = { &s_wxluatag_wxGrid, &s_wxluatag_wxGridTableBase, &s_wxluaarg_Boolean, &s_wxluaarg_Integer, NULL }; static int LUACALL wxLua_wxGrid_SetTable(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxGrid_SetTable[1] = {{ wxLua_wxGrid_SetTable, WXLUAMETHOD_METHOD, 2, 4, s_wxluatagArray_wxLua_wxGrid_SetTable }}; *************** *** 6921,6925 **** int argCount = lua_gettop(L); // wxGrid::wxGridSelectionModes selmode = wxGrid::wxGridSelectCells ! wxGrid::wxGridSelectionModes selmode = (argCount >= 4 ? (wxGrid::wxGridSelectionModes)wxlua_getenumerationtype(L, 4) : wxGrid::wxGridSelectCells); // bool takeOwnership = false bool takeOwnership = (argCount >= 3 ? wxlua_getbooleantype(L, 3) : false); --- 6920,6924 ---- int argCount = lua_gettop(L); // wxGrid::wxGridSelectionModes selmode = wxGrid::wxGridSelectCells ! wxGrid::wxGridSelectionModes selmode = (argCount >= 4 ? (wxGrid::wxGridSelectionModes)wxlua_getintegertype(L, 4) : wxGrid::wxGridSelectCells); // bool takeOwnership = false bool takeOwnership = (argCount >= 3 ? wxlua_getbooleantype(L, 3) : false); *************** *** 7102,7108 **** // call constructor returns = new wxGrid(parent, id, *pos, *size, style, name); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxGrid, returns); --- 7101,7106 ---- // call constructor returns = new wxGrid(parent, id, *pos, *size, style, name); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxGrid, returns); *************** *** 7644,7648 **** returns = new wxGridEvent(id, type, obj, row, col, x, y, sel, control, shift, alt, meta); // add to tracked memory list ! wxlState.AddTrackedObject((wxGridEvent *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxGridEvent, returns); --- 7642,7646 ---- returns = new wxGridEvent(id, type, obj, row, col, x, y, sel, control, shift, alt, meta); // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxGridEvent, returns); *************** *** 7841,7847 **** // call constructor returns = new wxGridSizeEvent(id, type, obj, rowOrCol, x, y, control, shift, alt, meta); ! // add to tracked window list ! if (returns && returns->IsKindOf(CLASSINFO(wxWindow))) ! wxlState.AddTrackedWindow((wxWindow*)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxGridSizeEvent, returns); --- 7839,7844 ---- // call constructor returns = new wxGridSizeEvent(id, type, obj, rowOrCol, x, y, control, shift, alt, meta); ! // add to tracked window list, it will check validity ! wxlState.AddTrackedWindow(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxGridSizeEvent, returns); *************** *** 8143,8147 **** returns = new wxGridRangeSelectEvent(id, type, obj, *topLeft, *bottomRight, sel, control, shift, alt, meta); // add to tracked memory list ! wxlState.AddTrackedObject((wxGridRangeSelectEvent *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxGridRangeSelectEvent, returns); --- 8140,8144 ---- returns = new wxGridRangeSelectEvent(id, type, obj, *topLeft, *bottomRight, sel, control, shift, alt, meta); // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxGridRangeSelectEvent, returns); *************** *** 8336,8340 **** returns = new wxGridEditorCreatedEvent(id, type, obj, row, col, ctrl); // add to tracked memory list ! wxlState.AddTrackedObject((wxGridEditorCreatedEvent *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxGridEditorCreatedEvent, returns); --- 8333,8337 ---- returns = new wxGridEditorCreatedEvent(id, type, obj, row, col, ctrl); // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxGridEditorCreatedEvent, returns); Index: file.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/file.cpp,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** file.cpp 11 Jun 2007 03:58:03 -0000 1.48 --- file.cpp 12 Jun 2007 00:08:38 -0000 1.49 *************** *** 312,316 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxFileName_Assign4[] = { &s_wxluatag_wxFileName, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_Enum, NULL }; static int LUACALL wxLua_wxFileName_Assign4(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxFileName_Assign4[1] = {{ wxLua_wxFileName_Assign4, WXLUAMETHOD_METHOD, 4, 5, s_wxluatagArray_wxLua_wxFileName_Assign4 }}; --- 312,316 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxFileName_Assign4[] = { &s_wxluatag_wxFileName, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_Integer, NULL }; static int LUACALL wxLua_wxFileName_Assign4(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxFileName_Assign4[1] = {{ wxLua_wxFileName_Assign4, WXLUAMETHOD_METHOD, 4, 5, s_wxluatagArray_wxLua_wxFileName_Assign4 }}; *************** *** 322,326 **** int argCount = lua_gettop(L); // wxPathFormat format = wxPATH_NATIVE ! wxPathFormat format = (argCount >= 5 ? (wxPathFormat)wxlua_getenumerationtype(L, 5) : wxPATH_NATIVE); // const wxString ext const wxString ext = wxlState.GetwxStringType(4); --- 322,326 ---- int argCount = lua_gettop(L); // wxPathFormat format = wxPATH_NATIVE ! wxPathFormat format = (argCount >= 5 ? (wxPathFormat)wxlua_getintegertype(L, 5) : wxPATH_NATIVE); // const wxString ext const wxString ext = wxlState.GetwxStringType(4); *************** *** 337,341 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxFileName_Assign3[] = { &s_wxluatag_wxFileName, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_Enum, NULL }; static int LUACALL wxLua_wxFileName_Assign3(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxFileName_Assign3[1] = {{ wxLua_wxFileName_Assign3, WXLUAMETHOD_METHOD, 3, 4, s_wxluatagArray_wxLua_wxFileName_Assign3 }}; --- 337,341 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxFileName_Assign3[] = { &s_wxluatag_wxFileName, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_Integer, NULL }; static int LUACALL wxLua_wxFileName_Assign3(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxFileName_Assign3[1] = {{ wxLua_wxFileName_Assign3, WXLUAMETHOD_METHOD, 3, 4, s_wxluatagArray_wxLua_wxFileName_Assign3 }}; *************** *** 347,351 **** int argCount = lua_gettop(L); // wxPathFormat format = wxPATH_NATIVE ! wxPathFormat format = (argCount >= 4 ? (wxPathFormat)wxlua_getenumerationtype(L, 4) : wxPATH_NATIVE); // const wxString name const wxString name = wxlState.GetwxStringType(3); --- 347,351 ---- int argCount = lua_gettop(L); // wxPathFormat format = wxPATH_NATIVE ! wxPathFormat format = (argCount >= 4 ? (wxPathFormat)wxlua_getintegertype(L, 4) : wxPATH_NATIVE); // const wxString name const wxString name = wxlState.GetwxStringType(3); *************** *** 360,364 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxFileName_Assign2[] = { &s_wxluatag_wxFileName, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_Enum, NULL }; static int LUACALL wxLua_wxFileName_Assign2(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxFileName_Assign2[1] = {{ wxLua_wxFileName_Assign2, WXLUAMETHOD_METHOD, 5, 6, s_wxluatagArray_wxLua_wxFileName_Assign2 }}; --- 360,364 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxFileName_Assign2[] = { &s_wxluatag_wxFileName, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_Integer, NULL }; static int LUACALL wxLua_wxFileName_Assign2(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxFileName_Assign2[1] = {{ wxLua_wxFileName_Assign2, WXLUAMETHOD_METHOD, 5, 6, s_wxluatagArray_wxLua_wxFileName_Assign2 }}; *************** *** 370,374 **** int argCount = lua_gettop(L); // wxPathFormat format = wxPATH_NATIVE ! wxPathFormat format = (argCount >= 6 ? (wxPathFormat)wxlua_getenumerationtype(L, 6) : wxPATH_NATIVE); // const wxString ext const wxString ext = wxlState.GetwxStringType(5); --- 370,374 ---- int argCount = lua_gettop(L); // wxPathFormat format = wxPATH_NATIVE ! wxPathFormat format = (argCount >= 6 ? (wxPathFormat)wxlua_getintegertype(L, 6) : wxPATH_NATIVE); // const wxString ext const wxString ext = wxlState.GetwxStringType(5); *************** *** 387,391 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxFileName_Assign1[] = { &s_wxluatag_wxFileName, &s_wxluaarg_String, &s_wxluaarg_Enum, NULL }; static int LUACALL wxLua_wxFileName_Assign1(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxFileName_Assign1[1] = {{ wxLua_wxFileName_Assign1, WXLUAMETHOD_METHOD, 2, 3, s_wxluatagArray_wxLua_wxFileName_Assign1 }}; --- 387,391 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxFileName_Assign1[] = { &s_wxluatag_wxFileName, &s_wxluaarg_String, &s_wxluaarg_Integer, NULL }; static int LUACALL wxLua_wxFileName_Assign1(lua_State *L); // static wxLuaBindCFunc s_wxluafunc_wxLua_wxFileName_Assign1[1] = {{ wxLua_wxFileName_Assign1, WXLUAMETHOD_METHOD, 2, 3, s_wxluatagArray_wxLua_wxFileName_Assign1 }}; *************** *** 397,401 **** int argCount = lua_gettop(L); // wxPathFormat format = wxPATH_NATIVE ! wxPathFormat format = (argCount >= 3 ? (wxPathFormat)wxlua_getenumerationtype(L, 3) : wxPATH_NATIVE); // const wxString fullpath const wxString fullpath = wxlState.GetwxStringType(2); --- 397,401 ---- int argCount = lua_gettop(L); // wxPathFormat format = wxPATH_NATIVE ! wxPathFormat format = (argCount >= 3 ? (wxPathFormat)wxlua_getintegertype(L, 3) : wxPATH_NATIVE); // const wxString fullpath const wxString fullpath = wxlState.GetwxStringType(2); *************** *** 444,448 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxFileName_AssignDir[] = { &s_wxluatag_wxFileName, &s_wxluaarg_String, &s_wxluaarg_Enum, NULL }; static int LUACALL wxLua_wxFileName_AssignDir(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxFileName_AssignDir[1] = {{ wxLua_wxFileName_AssignDir, WXLUAMETHOD_METHOD, 2, 3, s_wxluatagArray_wxLua_wxFileName_AssignDir }}; --- 444,448 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxFileName_AssignDir[] = { &s_wxluatag_wxFileName, &s_wxluaarg_String, &s_wxluaarg_Integer, NULL }; static int LUACALL wxLua_wxFileName_AssignDir(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxFileName_AssignDir[1] = {{ wxLua_wxFileName_AssignDir, WXLUAMETHOD_METHOD, 2, 3, s_wxluatagArray_wxLua_wxFileName_AssignDir }}; *************** *** 454,458 **** int argCount = lua_gettop(L); // wxPathFormat format = wxPATH_NATIVE ! wxPathFormat format = (argCount >= 3 ? (wxPathFormat)wxlua_getenumerationtype(L, 3) : wxPATH_NATIVE); // const wxString dir const wxString dir = wxlState.GetwxStringType(2); --- 454,458 ---- int argCount = lua_gettop(L); // wxPathFormat format = wxPATH_NATIVE ! wxPathFormat format = (argCount >= 3 ? (wxPathFormat)wxlua_getintegertype(L, 3) : wxPATH_NATIVE); // const wxString dir const wxString dir = wxlState.GetwxStringType(2); *************** *** 787,791 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxFileName_GetForbiddenChars[] = { &s_wxluaarg_Enum, NULL }; static int LUACALL wxLua_wxFileName_GetForbiddenChars(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxFileName_GetForbiddenChars[1] = {{ wxLua_wxFileName_GetForbiddenChars, WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, 0, 1, s_wxluatagArray_wxLua_wxFileName_GetForbiddenChars }}; --- 787,791 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxFileName_GetForbiddenChars[] = { &s_wxluaarg_Integer, NULL }; static int LUACALL wxLua_wxFileName_GetForbiddenChars(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxFileName_GetForbiddenChars[1] = {{ wxLua_wxFileName_GetForbiddenChars, WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, 0, 1, s_wxluatagArray_wxLua_wxFileName_GetForbiddenChars }}; *************** *** 798,802 **** int argCount = lua_gettop(L); // wxPathFormat format = wxPATH_NATIVE ! wxPathFormat format = (argCount >= 1 ? (wxPathFormat)wxlua_getenumerationtype(L, 1) : wxPATH_NATIVE); // call GetForbiddenChars returns = wxFileName::GetForbiddenChars(format); --- 798,802 ---- int argCount = lua_gettop(L); // wxPathFormat format = wxPATH_NATIVE ! wxPathFormat format = (argCount >= 1 ? (wxPathFormat)wxlua_getintegertype(L, 1) : wxPATH_NATIVE); // call GetForbiddenChars returns = wxFileName::GetForbiddenChars(format); *************** *** 807,811 **** } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxFileName_GetFormat[] = { &s_wxluaarg_Enum, NULL }; static int LUACALL wxLua_wxFileName_GetFormat(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxFileName_GetFormat[1] = {{ wxLua_wxFileName_GetFormat, WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, 0, 1, s_wxluatagArray_wxLua_wxFileName_GetFormat }}; --- 807,811 ---- } ! static wxLuaArgTag s_wxluatagArray_wxLua_wxFileName_GetFormat[] = { &s_wxluaarg_Integer, NULL }; static int LUACALL wxLua_wxFileName_GetFormat(lua_State *L); static wxLuaBindCFunc s_wxluafunc_wxLua_wxFileName_GetFormat[1] = {{ wxLua_wxFi... [truncated message content] |