You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(191) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(238) |
Dec
(68) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(104) |
Feb
(518) |
Mar
(302) |
Apr
(211) |
May
(311) |
Jun
(55) |
Jul
(6) |
Aug
(35) |
Sep
(76) |
Oct
(50) |
Nov
(37) |
Dec
(340) |
2007 |
Jan
(23) |
Feb
(107) |
Mar
(98) |
Apr
(60) |
May
(136) |
Jun
(371) |
Jul
(175) |
Aug
(74) |
Sep
(3) |
Oct
(2) |
Nov
(53) |
Dec
(129) |
2008 |
Jan
(337) |
Feb
(23) |
Mar
(18) |
Apr
(4) |
May
(3) |
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
(33) |
Nov
|
Dec
(26) |
2009 |
Jan
(4) |
Feb
(1) |
Mar
(15) |
Apr
|
May
(35) |
Jun
(11) |
Jul
|
Aug
|
Sep
(19) |
Oct
(26) |
Nov
(11) |
Dec
(11) |
2010 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(8) |
Sep
|
Oct
|
Nov
(8) |
Dec
(7) |
2011 |
Jan
|
Feb
|
Mar
(4) |
Apr
(8) |
May
(5) |
Jun
(8) |
Jul
(1) |
Aug
|
Sep
|
Oct
(5) |
Nov
(13) |
Dec
|
From: John L. <jr...@us...> - 2009-12-21 04:06:52
|
Update of /cvsroot/wxlua/wxLua/apps/wxluacan/src In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv10162/wxLua/apps/wxluacan/src Modified Files: wxluacan_bind.cpp wxluacan_bind.h Log Message: Use a wxArray instead of a wxList for the wxLuaBindingArray (was List) Simplify and cleanup initializing the bindings, linking base class wxLuaBindMethods Index: wxluacan_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/wxluacan_bind.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** wxluacan_bind.h 1 Oct 2009 04:20:59 -0000 1.8 --- wxluacan_bind.h 21 Dec 2009 04:06:09 -0000 1.9 *************** *** 18,24 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- --- 18,24 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 30 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 30 // --------------------------------------------------------------------------- *************** *** 36,40 **** // initialize wxLuaBinding_wxluacan for all wxLuaStates ! extern WXLUA_NO_DLLIMPEXP bool wxLuaBinding_wxluacan_init(); // --------------------------------------------------------------------------- --- 36,40 ---- // initialize wxLuaBinding_wxluacan for all wxLuaStates ! extern WXLUA_NO_DLLIMPEXP wxLuaBinding* wxLuaBinding_wxluacan_init(); // --------------------------------------------------------------------------- Index: wxluacan_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/wxluacan_bind.cpp,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** wxluacan_bind.cpp 1 Oct 2009 04:20:59 -0000 1.39 --- wxluacan_bind.cpp 21 Dec 2009 04:06:09 -0000 1.40 *************** *** 774,777 **** --- 774,778 ---- m_objectArray = wxLuaGetObjectList_wxluacan(m_objectCount); m_functionArray = wxLuaGetFunctionList_wxluacan(m_functionCount); + InitBinding(); } *************** *** 780,790 **** // --------------------------------------------------------------------------- ! bool wxLuaBinding_wxluacan_init() { static wxLuaBinding_wxluacan m_binding; - if (wxLuaBinding::GetBindingList()->Find(&m_binding)) return false; ! wxLuaBinding::GetBindingList()->Append(&m_binding); ! return true; } --- 781,792 ---- // --------------------------------------------------------------------------- ! wxLuaBinding* wxLuaBinding_wxluacan_init() { static wxLuaBinding_wxluacan m_binding; ! if (wxLuaBinding::GetBindingArray().Index(&m_binding) == wxNOT_FOUND) ! wxLuaBinding::GetBindingArray().Add(&m_binding); ! ! return &m_binding; } |
From: John L. <jr...@us...> - 2009-12-21 04:06:50
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/include In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv10162/wxLua/modules/wxbind/include Modified Files: wxadv_bind.h wxaui_bind.h wxbase_bind.h wxbinddefs.h wxcore_bind.h wxgl_bind.h wxhtml_bind.h wxmedia_bind.h wxnet_bind.h wxrichtext_bind.h wxstc_bind.h wxxml_bind.h wxxrc_bind.h Log Message: Use a wxArray instead of a wxList for the wxLuaBindingArray (was List) Simplify and cleanup initializing the bindings, linking base class wxLuaBindMethods Index: wxadv_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxadv_bind.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** wxadv_bind.h 1 Oct 2009 04:21:01 -0000 1.21 --- wxadv_bind.h 21 Dec 2009 04:06:10 -0000 1.22 *************** *** 20,26 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- --- 20,26 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 30 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 30 // --------------------------------------------------------------------------- *************** *** 38,42 **** // initialize wxLuaBinding_wxadv for all wxLuaStates ! extern WXDLLIMPEXP_BINDWXADV bool wxLuaBinding_wxadv_init(); // --------------------------------------------------------------------------- --- 38,42 ---- // initialize wxLuaBinding_wxadv for all wxLuaStates ! extern WXDLLIMPEXP_BINDWXADV wxLuaBinding* wxLuaBinding_wxadv_init(); // --------------------------------------------------------------------------- Index: wxcore_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxcore_bind.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** wxcore_bind.h 1 Oct 2009 04:21:01 -0000 1.22 --- wxcore_bind.h 21 Dec 2009 04:06:11 -0000 1.23 *************** *** 20,26 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- --- 20,26 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 30 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 30 // --------------------------------------------------------------------------- *************** *** 39,43 **** // initialize wxLuaBinding_wxcore for all wxLuaStates ! extern WXDLLIMPEXP_BINDWXCORE bool wxLuaBinding_wxcore_init(); // --------------------------------------------------------------------------- --- 39,43 ---- // initialize wxLuaBinding_wxcore for all wxLuaStates ! extern WXDLLIMPEXP_BINDWXCORE wxLuaBinding* wxLuaBinding_wxcore_init(); // --------------------------------------------------------------------------- Index: wxbinddefs.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxbinddefs.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** wxbinddefs.h 11 Jan 2008 22:20:47 -0000 1.11 --- wxbinddefs.h 21 Dec 2009 04:06:11 -0000 1.12 *************** *** 243,247 **** #if wxLUA_USEBINDING_WXLUA ! #define WXLUA_DECLARE_BIND_WXLUA extern WXDLLIMPEXP_WXLUA bool wxLuaBinding_wxlua_init(); // modules/wxlua #define WXLUA_IMPLEMENT_BIND_WXLUA wxLuaBinding_wxlua_init(); #else --- 243,247 ---- #if wxLUA_USEBINDING_WXLUA ! #define WXLUA_DECLARE_BIND_WXLUA extern WXDLLIMPEXP_WXLUA wxLuaBinding* wxLuaBinding_wxlua_init(); // modules/wxlua #define WXLUA_IMPLEMENT_BIND_WXLUA wxLuaBinding_wxlua_init(); #else *************** *** 251,255 **** #if wxLUA_USEBINDING_WXLUASOCKET ! #define WXLUA_DECLARE_BIND_WXLUASOCKET extern WXDLLIMPEXP_WXLUASOCKET bool wxLuaBinding_wxluasocket_init(); // modules/wxluasocket #define WXLUA_IMPLEMENT_BIND_WXLUASOCKET wxLuaBinding_wxluasocket_init(); #else --- 251,255 ---- #if wxLUA_USEBINDING_WXLUASOCKET ! #define WXLUA_DECLARE_BIND_WXLUASOCKET extern WXDLLIMPEXP_WXLUASOCKET wxLuaBinding* wxLuaBinding_wxluasocket_init(); // modules/wxluasocket #define WXLUA_IMPLEMENT_BIND_WXLUASOCKET wxLuaBinding_wxluasocket_init(); #else *************** *** 261,265 **** #if wxLUA_USEBINDING_WXADV ! #define WXLUA_DECLARE_BIND_WXADV extern WXDLLIMPEXP_BINDWXADV bool wxLuaBinding_wxadv_init(); // modules/wxbind #define WXLUA_IMPLEMENT_BIND_WXADV wxLuaBinding_wxadv_init(); #else --- 261,265 ---- #if wxLUA_USEBINDING_WXADV ! #define WXLUA_DECLARE_BIND_WXADV extern WXDLLIMPEXP_BINDWXADV wxLuaBinding* wxLuaBinding_wxadv_init(); // modules/wxbind #define WXLUA_IMPLEMENT_BIND_WXADV wxLuaBinding_wxadv_init(); #else *************** *** 269,273 **** #if wxLUA_USEBINDING_WXAUI && wxUSE_AUI ! #define WXLUA_DECLARE_BIND_WXAUI extern WXDLLIMPEXP_BINDWXAUI bool wxLuaBinding_wxaui_init(); // modules/wxbind #define WXLUA_IMPLEMENT_BIND_WXAUI wxLuaBinding_wxaui_init(); #else --- 269,273 ---- #if wxLUA_USEBINDING_WXAUI && wxUSE_AUI ! #define WXLUA_DECLARE_BIND_WXAUI extern WXDLLIMPEXP_BINDWXAUI wxLuaBinding* wxLuaBinding_wxaui_init(); // modules/wxbind #define WXLUA_IMPLEMENT_BIND_WXAUI wxLuaBinding_wxaui_init(); #else *************** *** 278,282 **** #if wxLUA_USEBINDING_WXBASE ! #define WXLUA_DECLARE_BIND_WXBASE extern WXDLLIMPEXP_BINDWXBASE bool wxLuaBinding_wxbase_init(); // modules/wxbind #define WXLUA_IMPLEMENT_BIND_WXBASE wxLuaBinding_wxbase_init(); #else --- 278,282 ---- #if wxLUA_USEBINDING_WXBASE ! #define WXLUA_DECLARE_BIND_WXBASE extern WXDLLIMPEXP_BINDWXBASE wxLuaBinding* wxLuaBinding_wxbase_init(); // modules/wxbind #define WXLUA_IMPLEMENT_BIND_WXBASE wxLuaBinding_wxbase_init(); #else *************** *** 286,290 **** #if wxLUA_USEBINDING_WXCORE ! #define WXLUA_DECLARE_BIND_WXCORE extern WXDLLIMPEXP_BINDWXCORE bool wxLuaBinding_wxcore_init(); // modules/wxbind #define WXLUA_IMPLEMENT_BIND_WXCORE wxLuaBinding_wxcore_init(); #else --- 286,290 ---- #if wxLUA_USEBINDING_WXCORE ! #define WXLUA_DECLARE_BIND_WXCORE extern WXDLLIMPEXP_BINDWXCORE wxLuaBinding* wxLuaBinding_wxcore_init(); // modules/wxbind #define WXLUA_IMPLEMENT_BIND_WXCORE wxLuaBinding_wxcore_init(); #else *************** *** 294,298 **** #if wxLUA_USEBINDING_WXGL && wxUSE_GLCANVAS ! #define WXLUA_DECLARE_BIND_WXGL extern WXDLLIMPEXP_BINDWXGL bool wxLuaBinding_wxgl_init(); // modules/wxbind #define WXLUA_IMPLEMENT_BIND_WXGL wxLuaBinding_wxgl_init(); #else --- 294,298 ---- #if wxLUA_USEBINDING_WXGL && wxUSE_GLCANVAS ! #define WXLUA_DECLARE_BIND_WXGL extern WXDLLIMPEXP_BINDWXGL wxLuaBinding* wxLuaBinding_wxgl_init(); // modules/wxbind #define WXLUA_IMPLEMENT_BIND_WXGL wxLuaBinding_wxgl_init(); #else *************** *** 302,306 **** #if wxLUA_USEBINDING_WXHTML && wxUSE_HTML ! #define WXLUA_DECLARE_BIND_WXHTML extern WXDLLIMPEXP_BINDWXHTML bool wxLuaBinding_wxhtml_init(); // modules/wxbind #define WXLUA_IMPLEMENT_BIND_WXHTML wxLuaBinding_wxhtml_init(); #else --- 302,306 ---- #if wxLUA_USEBINDING_WXHTML && wxUSE_HTML ! #define WXLUA_DECLARE_BIND_WXHTML extern WXDLLIMPEXP_BINDWXHTML wxLuaBinding* wxLuaBinding_wxhtml_init(); // modules/wxbind #define WXLUA_IMPLEMENT_BIND_WXHTML wxLuaBinding_wxhtml_init(); #else *************** *** 310,314 **** #if wxLUA_USEBINDING_WXMEDIA && wxUSE_MEDIACTRL ! #define WXLUA_DECLARE_BIND_WXMEDIA extern WXDLLIMPEXP_BINDWXMEDIA bool wxLuaBinding_wxmedia_init(); // modules/wxbind #define WXLUA_IMPLEMENT_BIND_WXMEDIA wxLuaBinding_wxmedia_init(); #else --- 310,314 ---- #if wxLUA_USEBINDING_WXMEDIA && wxUSE_MEDIACTRL ! #define WXLUA_DECLARE_BIND_WXMEDIA extern WXDLLIMPEXP_BINDWXMEDIA wxLuaBinding* wxLuaBinding_wxmedia_init(); // modules/wxbind #define WXLUA_IMPLEMENT_BIND_WXMEDIA wxLuaBinding_wxmedia_init(); #else *************** *** 318,322 **** #if wxLUA_USEBINDING_WXNET ! #define WXLUA_DECLARE_BIND_WXNET extern WXDLLIMPEXP_BINDWXNET bool wxLuaBinding_wxnet_init(); // modules/wxbind #define WXLUA_IMPLEMENT_BIND_WXNET wxLuaBinding_wxnet_init(); #else --- 318,322 ---- #if wxLUA_USEBINDING_WXNET ! #define WXLUA_DECLARE_BIND_WXNET extern WXDLLIMPEXP_BINDWXNET wxLuaBinding* wxLuaBinding_wxnet_init(); // modules/wxbind #define WXLUA_IMPLEMENT_BIND_WXNET wxLuaBinding_wxnet_init(); #else *************** *** 326,330 **** #if wxLUA_USEBINDING_WXRICHTEXT && wxUSE_RICHTEXT ! #define WXLUA_DECLARE_BIND_WXRICHTEXT extern WXDLLIMPEXP_BINDWXRICHTEXT bool wxLuaBinding_wxrichtext_init(); // modules/wxbind #define WXLUA_IMPLEMENT_BIND_WXRICHTEXT wxLuaBinding_wxrichtext_init(); #else --- 326,330 ---- #if wxLUA_USEBINDING_WXRICHTEXT && wxUSE_RICHTEXT ! #define WXLUA_DECLARE_BIND_WXRICHTEXT extern WXDLLIMPEXP_BINDWXRICHTEXT wxLuaBinding* wxLuaBinding_wxrichtext_init(); // modules/wxbind #define WXLUA_IMPLEMENT_BIND_WXRICHTEXT wxLuaBinding_wxrichtext_init(); #else *************** *** 334,338 **** #if wxLUA_USEBINDING_WXSTC ! #define WXLUA_DECLARE_BIND_WXSTC extern WXDLLIMPEXP_BINDWXSTC bool wxLuaBinding_wxstc_init(); // modules/wxbind #define WXLUA_IMPLEMENT_BIND_WXSTC wxLuaBinding_wxstc_init(); #else --- 334,338 ---- #if wxLUA_USEBINDING_WXSTC ! #define WXLUA_DECLARE_BIND_WXSTC extern WXDLLIMPEXP_BINDWXSTC wxLuaBinding* wxLuaBinding_wxstc_init(); // modules/wxbind #define WXLUA_IMPLEMENT_BIND_WXSTC wxLuaBinding_wxstc_init(); #else *************** *** 342,346 **** #if wxLUA_USEBINDING_WXXML && wxUSE_XML ! #define WXLUA_DECLARE_BIND_WXXML extern WXDLLIMPEXP_BINDWXXML bool wxLuaBinding_wxxml_init(); // modules/wxbind #define WXLUA_IMPLEMENT_BIND_WXXML wxLuaBinding_wxxml_init(); #else --- 342,346 ---- #if wxLUA_USEBINDING_WXXML && wxUSE_XML ! #define WXLUA_DECLARE_BIND_WXXML extern WXDLLIMPEXP_BINDWXXML wxLuaBinding* wxLuaBinding_wxxml_init(); // modules/wxbind #define WXLUA_IMPLEMENT_BIND_WXXML wxLuaBinding_wxxml_init(); #else *************** *** 350,354 **** #if wxLUA_USEBINDING_WXXRC && wxUSE_XRC ! #define WXLUA_DECLARE_BIND_WXXRC extern WXDLLIMPEXP_BINDWXXRC bool wxLuaBinding_wxxrc_init(); // modules/wxbind #define WXLUA_IMPLEMENT_BIND_WXXRC wxLuaBinding_wxxrc_init(); #else --- 350,354 ---- #if wxLUA_USEBINDING_WXXRC && wxUSE_XRC ! #define WXLUA_DECLARE_BIND_WXXRC extern WXDLLIMPEXP_BINDWXXRC wxLuaBinding* wxLuaBinding_wxxrc_init(); // modules/wxbind #define WXLUA_IMPLEMENT_BIND_WXXRC wxLuaBinding_wxxrc_init(); #else Index: wxrichtext_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxrichtext_bind.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** wxrichtext_bind.h 1 Oct 2009 04:21:01 -0000 1.19 --- wxrichtext_bind.h 21 Dec 2009 04:06:11 -0000 1.20 *************** *** 20,26 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- --- 20,26 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 30 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 30 // --------------------------------------------------------------------------- *************** *** 38,42 **** // initialize wxLuaBinding_wxrichtext for all wxLuaStates ! extern WXDLLIMPEXP_BINDWXRICHTEXT bool wxLuaBinding_wxrichtext_init(); // --------------------------------------------------------------------------- --- 38,42 ---- // initialize wxLuaBinding_wxrichtext for all wxLuaStates ! extern WXDLLIMPEXP_BINDWXRICHTEXT wxLuaBinding* wxLuaBinding_wxrichtext_init(); // --------------------------------------------------------------------------- Index: wxxrc_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxxrc_bind.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** wxxrc_bind.h 1 Oct 2009 04:21:01 -0000 1.19 --- wxxrc_bind.h 21 Dec 2009 04:06:11 -0000 1.20 *************** *** 20,26 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- --- 20,26 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 30 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 30 // --------------------------------------------------------------------------- *************** *** 38,42 **** // initialize wxLuaBinding_wxxrc for all wxLuaStates ! extern WXDLLIMPEXP_BINDWXXRC bool wxLuaBinding_wxxrc_init(); // --------------------------------------------------------------------------- --- 38,42 ---- // initialize wxLuaBinding_wxxrc for all wxLuaStates ! extern WXDLLIMPEXP_BINDWXXRC wxLuaBinding* wxLuaBinding_wxxrc_init(); // --------------------------------------------------------------------------- Index: wxnet_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxnet_bind.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** wxnet_bind.h 1 Oct 2009 04:21:01 -0000 1.19 --- wxnet_bind.h 21 Dec 2009 04:06:11 -0000 1.20 *************** *** 20,26 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- --- 20,26 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 30 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 30 // --------------------------------------------------------------------------- *************** *** 38,42 **** // initialize wxLuaBinding_wxnet for all wxLuaStates ! extern WXDLLIMPEXP_BINDWXNET bool wxLuaBinding_wxnet_init(); // --------------------------------------------------------------------------- --- 38,42 ---- // initialize wxLuaBinding_wxnet for all wxLuaStates ! extern WXDLLIMPEXP_BINDWXNET wxLuaBinding* wxLuaBinding_wxnet_init(); // --------------------------------------------------------------------------- Index: wxbase_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxbase_bind.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** wxbase_bind.h 1 Oct 2009 04:21:01 -0000 1.20 --- wxbase_bind.h 21 Dec 2009 04:06:10 -0000 1.21 *************** *** 33,39 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- --- 33,39 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 30 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 30 // --------------------------------------------------------------------------- *************** *** 52,56 **** // initialize wxLuaBinding_wxbase for all wxLuaStates ! extern WXDLLIMPEXP_BINDWXBASE bool wxLuaBinding_wxbase_init(); // --------------------------------------------------------------------------- --- 52,56 ---- // initialize wxLuaBinding_wxbase for all wxLuaStates ! extern WXDLLIMPEXP_BINDWXBASE wxLuaBinding* wxLuaBinding_wxbase_init(); // --------------------------------------------------------------------------- Index: wxmedia_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxmedia_bind.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** wxmedia_bind.h 1 Oct 2009 04:21:01 -0000 1.19 --- wxmedia_bind.h 21 Dec 2009 04:06:11 -0000 1.20 *************** *** 21,27 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- --- 21,27 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 30 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 30 // --------------------------------------------------------------------------- *************** *** 39,43 **** // initialize wxLuaBinding_wxmedia for all wxLuaStates ! extern WXDLLIMPEXP_BINDWXMEDIA bool wxLuaBinding_wxmedia_init(); // --------------------------------------------------------------------------- --- 39,43 ---- // initialize wxLuaBinding_wxmedia for all wxLuaStates ! extern WXDLLIMPEXP_BINDWXMEDIA wxLuaBinding* wxLuaBinding_wxmedia_init(); // --------------------------------------------------------------------------- Index: wxgl_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxgl_bind.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** wxgl_bind.h 1 Oct 2009 04:21:01 -0000 1.19 --- wxgl_bind.h 21 Dec 2009 04:06:11 -0000 1.20 *************** *** 20,26 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- --- 20,26 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 30 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 30 // --------------------------------------------------------------------------- *************** *** 38,42 **** // initialize wxLuaBinding_wxgl for all wxLuaStates ! extern WXDLLIMPEXP_BINDWXGL bool wxLuaBinding_wxgl_init(); // --------------------------------------------------------------------------- --- 38,42 ---- // initialize wxLuaBinding_wxgl for all wxLuaStates ! extern WXDLLIMPEXP_BINDWXGL wxLuaBinding* wxLuaBinding_wxgl_init(); // --------------------------------------------------------------------------- Index: wxstc_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxstc_bind.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** wxstc_bind.h 1 Oct 2009 04:21:01 -0000 1.19 --- wxstc_bind.h 21 Dec 2009 04:06:11 -0000 1.20 *************** *** 20,26 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- --- 20,26 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 30 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 30 // --------------------------------------------------------------------------- *************** *** 38,42 **** // initialize wxLuaBinding_wxstc for all wxLuaStates ! extern WXDLLIMPEXP_BINDWXSTC bool wxLuaBinding_wxstc_init(); // --------------------------------------------------------------------------- --- 38,42 ---- // initialize wxLuaBinding_wxstc for all wxLuaStates ! extern WXDLLIMPEXP_BINDWXSTC wxLuaBinding* wxLuaBinding_wxstc_init(); // --------------------------------------------------------------------------- Index: wxaui_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxaui_bind.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** wxaui_bind.h 1 Oct 2009 04:21:01 -0000 1.20 --- wxaui_bind.h 21 Dec 2009 04:06:10 -0000 1.21 *************** *** 20,26 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- --- 20,26 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 30 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 30 // --------------------------------------------------------------------------- *************** *** 38,42 **** // initialize wxLuaBinding_wxaui for all wxLuaStates ! extern WXDLLIMPEXP_BINDWXAUI bool wxLuaBinding_wxaui_init(); // --------------------------------------------------------------------------- --- 38,42 ---- // initialize wxLuaBinding_wxaui for all wxLuaStates ! extern WXDLLIMPEXP_BINDWXAUI wxLuaBinding* wxLuaBinding_wxaui_init(); // --------------------------------------------------------------------------- Index: wxhtml_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxhtml_bind.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** wxhtml_bind.h 1 Oct 2009 04:21:01 -0000 1.20 --- wxhtml_bind.h 21 Dec 2009 04:06:11 -0000 1.21 *************** *** 20,26 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- --- 20,26 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 30 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 30 // --------------------------------------------------------------------------- *************** *** 38,42 **** // initialize wxLuaBinding_wxhtml for all wxLuaStates ! extern WXDLLIMPEXP_BINDWXHTML bool wxLuaBinding_wxhtml_init(); // --------------------------------------------------------------------------- --- 38,42 ---- // initialize wxLuaBinding_wxhtml for all wxLuaStates ! extern WXDLLIMPEXP_BINDWXHTML wxLuaBinding* wxLuaBinding_wxhtml_init(); // --------------------------------------------------------------------------- Index: wxxml_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxxml_bind.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** wxxml_bind.h 1 Oct 2009 04:21:01 -0000 1.19 --- wxxml_bind.h 21 Dec 2009 04:06:11 -0000 1.20 *************** *** 20,26 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- --- 20,26 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 30 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 30 // --------------------------------------------------------------------------- *************** *** 38,42 **** // initialize wxLuaBinding_wxxml for all wxLuaStates ! extern WXDLLIMPEXP_BINDWXXML bool wxLuaBinding_wxxml_init(); // --------------------------------------------------------------------------- --- 38,42 ---- // initialize wxLuaBinding_wxxml for all wxLuaStates ! extern WXDLLIMPEXP_BINDWXXML wxLuaBinding* wxLuaBinding_wxxml_init(); // --------------------------------------------------------------------------- |
From: John L. <jr...@us...> - 2009-12-21 04:06:28
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv10162/wxLua/modules/wxluasocket/src Modified Files: wxluasocket_bind.cpp Log Message: Use a wxArray instead of a wxList for the wxLuaBindingArray (was List) Simplify and cleanup initializing the bindings, linking base class wxLuaBindMethods Index: wxluasocket_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxluasocket_bind.cpp,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** wxluasocket_bind.cpp 1 Oct 2009 04:21:02 -0000 1.37 --- wxluasocket_bind.cpp 21 Dec 2009 04:06:14 -0000 1.38 *************** *** 671,674 **** --- 671,675 ---- m_objectArray = wxLuaGetObjectList_wxluasocket(m_objectCount); m_functionArray = wxLuaGetFunctionList_wxluasocket(m_functionCount); + InitBinding(); } *************** *** 677,687 **** // --------------------------------------------------------------------------- ! bool wxLuaBinding_wxluasocket_init() { static wxLuaBinding_wxluasocket m_binding; - if (wxLuaBinding::GetBindingList()->Find(&m_binding)) return false; ! wxLuaBinding::GetBindingList()->Append(&m_binding); ! return true; } --- 678,689 ---- // --------------------------------------------------------------------------- ! wxLuaBinding* wxLuaBinding_wxluasocket_init() { static wxLuaBinding_wxluasocket m_binding; ! if (wxLuaBinding::GetBindingArray().Index(&m_binding) == wxNOT_FOUND) ! wxLuaBinding::GetBindingArray().Add(&m_binding); ! ! return &m_binding; } |
From: John L. <jr...@us...> - 2009-12-21 04:06:28
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/include In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv10162/wxLua/modules/wxluasocket/include Modified Files: wxluasocket_bind.h Log Message: Use a wxArray instead of a wxList for the wxLuaBindingArray (was List) Simplify and cleanup initializing the bindings, linking base class wxLuaBindMethods Index: wxluasocket_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxluasocket_bind.h,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** wxluasocket_bind.h 1 Oct 2009 04:21:02 -0000 1.41 --- wxluasocket_bind.h 21 Dec 2009 04:06:14 -0000 1.42 *************** *** 20,26 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- --- 20,26 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 30 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 30 // --------------------------------------------------------------------------- *************** *** 38,42 **** // initialize wxLuaBinding_wxluasocket for all wxLuaStates ! extern WXDLLIMPEXP_WXLUASOCKET bool wxLuaBinding_wxluasocket_init(); // --------------------------------------------------------------------------- --- 38,42 ---- // initialize wxLuaBinding_wxluasocket for all wxLuaStates ! extern WXDLLIMPEXP_WXLUASOCKET wxLuaBinding* wxLuaBinding_wxluasocket_init(); // --------------------------------------------------------------------------- |
From: John L. <jr...@us...> - 2009-12-21 04:06:25
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv10162/wxLua/modules/wxbind/src Modified Files: wxadv_bind.cpp wxaui_bind.cpp wxbase_bind.cpp wxcore_bind.cpp wxgl_bind.cpp wxhtml_bind.cpp wxmedia_bind.cpp wxnet_bind.cpp wxrichtext_bind.cpp wxstc_bind.cpp wxxml_bind.cpp wxxrc_bind.cpp Log Message: Use a wxArray instead of a wxList for the wxLuaBindingArray (was List) Simplify and cleanup initializing the bindings, linking base class wxLuaBindMethods Index: wxbase_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxbase_bind.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** wxbase_bind.cpp 1 Oct 2009 04:21:01 -0000 1.24 --- wxbase_bind.cpp 21 Dec 2009 04:06:12 -0000 1.25 *************** *** 2823,2826 **** --- 2823,2827 ---- m_objectArray = wxLuaGetObjectList_wxbase(m_objectCount); m_functionArray = wxLuaGetFunctionList_wxbase(m_functionCount); + InitBinding(); } *************** *** 2847,2857 **** // --------------------------------------------------------------------------- ! bool wxLuaBinding_wxbase_init() { static wxLuaBinding_wxbase m_binding; - if (wxLuaBinding::GetBindingList()->Find(&m_binding)) return false; ! wxLuaBinding::GetBindingList()->Append(&m_binding); ! return true; } --- 2848,2859 ---- // --------------------------------------------------------------------------- ! wxLuaBinding* wxLuaBinding_wxbase_init() { static wxLuaBinding_wxbase m_binding; ! if (wxLuaBinding::GetBindingArray().Index(&m_binding) == wxNOT_FOUND) ! wxLuaBinding::GetBindingArray().Add(&m_binding); ! ! return &m_binding; } Index: wxnet_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxnet_bind.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** wxnet_bind.cpp 1 Oct 2009 04:21:01 -0000 1.19 --- wxnet_bind.cpp 21 Dec 2009 04:06:12 -0000 1.20 *************** *** 3121,3124 **** --- 3121,3125 ---- m_objectArray = wxLuaGetObjectList_wxnet(m_objectCount); m_functionArray = wxLuaGetFunctionList_wxnet(m_functionCount); + InitBinding(); } *************** *** 3127,3137 **** // --------------------------------------------------------------------------- ! bool wxLuaBinding_wxnet_init() { static wxLuaBinding_wxnet m_binding; - if (wxLuaBinding::GetBindingList()->Find(&m_binding)) return false; ! wxLuaBinding::GetBindingList()->Append(&m_binding); ! return true; } --- 3128,3139 ---- // --------------------------------------------------------------------------- ! wxLuaBinding* wxLuaBinding_wxnet_init() { static wxLuaBinding_wxnet m_binding; ! if (wxLuaBinding::GetBindingArray().Index(&m_binding) == wxNOT_FOUND) ! wxLuaBinding::GetBindingArray().Add(&m_binding); ! ! return &m_binding; } Index: wxstc_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxstc_bind.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wxstc_bind.cpp 1 Oct 2009 04:21:01 -0000 1.18 --- wxstc_bind.cpp 21 Dec 2009 04:06:12 -0000 1.19 *************** *** 10295,10298 **** --- 10295,10299 ---- m_objectArray = wxLuaGetObjectList_wxstc(m_objectCount); m_functionArray = wxLuaGetFunctionList_wxstc(m_functionCount); + InitBinding(); } *************** *** 10301,10311 **** // --------------------------------------------------------------------------- ! bool wxLuaBinding_wxstc_init() { static wxLuaBinding_wxstc m_binding; - if (wxLuaBinding::GetBindingList()->Find(&m_binding)) return false; ! wxLuaBinding::GetBindingList()->Append(&m_binding); ! return true; } --- 10302,10313 ---- // --------------------------------------------------------------------------- ! wxLuaBinding* wxLuaBinding_wxstc_init() { static wxLuaBinding_wxstc m_binding; ! if (wxLuaBinding::GetBindingArray().Index(&m_binding) == wxNOT_FOUND) ! wxLuaBinding::GetBindingArray().Add(&m_binding); ! ! return &m_binding; } Index: wxgl_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxgl_bind.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** wxgl_bind.cpp 1 Oct 2009 04:21:01 -0000 1.15 --- wxgl_bind.cpp 21 Dec 2009 04:06:12 -0000 1.16 *************** *** 762,765 **** --- 762,766 ---- m_objectArray = wxLuaGetObjectList_wxgl(m_objectCount); m_functionArray = wxLuaGetFunctionList_wxgl(m_functionCount); + InitBinding(); } *************** *** 768,778 **** // --------------------------------------------------------------------------- ! bool wxLuaBinding_wxgl_init() { static wxLuaBinding_wxgl m_binding; - if (wxLuaBinding::GetBindingList()->Find(&m_binding)) return false; ! wxLuaBinding::GetBindingList()->Append(&m_binding); ! return true; } --- 769,780 ---- // --------------------------------------------------------------------------- ! wxLuaBinding* wxLuaBinding_wxgl_init() { static wxLuaBinding_wxgl m_binding; ! if (wxLuaBinding::GetBindingArray().Index(&m_binding) == wxNOT_FOUND) ! wxLuaBinding::GetBindingArray().Add(&m_binding); ! ! return &m_binding; } Index: wxxrc_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxxrc_bind.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** wxxrc_bind.cpp 1 Oct 2009 04:21:01 -0000 1.15 --- wxxrc_bind.cpp 21 Dec 2009 04:06:12 -0000 1.16 *************** *** 823,826 **** --- 823,827 ---- m_objectArray = wxLuaGetObjectList_wxxrc(m_objectCount); m_functionArray = wxLuaGetFunctionList_wxxrc(m_functionCount); + InitBinding(); } *************** *** 829,839 **** // --------------------------------------------------------------------------- ! bool wxLuaBinding_wxxrc_init() { static wxLuaBinding_wxxrc m_binding; - if (wxLuaBinding::GetBindingList()->Find(&m_binding)) return false; ! wxLuaBinding::GetBindingList()->Append(&m_binding); ! return true; } --- 830,841 ---- // --------------------------------------------------------------------------- ! wxLuaBinding* wxLuaBinding_wxxrc_init() { static wxLuaBinding_wxxrc m_binding; ! if (wxLuaBinding::GetBindingArray().Index(&m_binding) == wxNOT_FOUND) ! wxLuaBinding::GetBindingArray().Add(&m_binding); ! ! return &m_binding; } Index: wxmedia_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxmedia_bind.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** wxmedia_bind.cpp 1 Oct 2009 04:21:01 -0000 1.16 --- wxmedia_bind.cpp 21 Dec 2009 04:06:12 -0000 1.17 *************** *** 799,802 **** --- 799,803 ---- m_objectArray = wxLuaGetObjectList_wxmedia(m_objectCount); m_functionArray = wxLuaGetFunctionList_wxmedia(m_functionCount); + InitBinding(); } *************** *** 805,815 **** // --------------------------------------------------------------------------- ! bool wxLuaBinding_wxmedia_init() { static wxLuaBinding_wxmedia m_binding; - if (wxLuaBinding::GetBindingList()->Find(&m_binding)) return false; ! wxLuaBinding::GetBindingList()->Append(&m_binding); ! return true; } --- 806,817 ---- // --------------------------------------------------------------------------- ! wxLuaBinding* wxLuaBinding_wxmedia_init() { static wxLuaBinding_wxmedia m_binding; ! if (wxLuaBinding::GetBindingArray().Index(&m_binding) == wxNOT_FOUND) ! wxLuaBinding::GetBindingArray().Add(&m_binding); ! ! return &m_binding; } Index: wxcore_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_bind.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** wxcore_bind.cpp 5 Oct 2009 02:51:29 -0000 1.28 --- wxcore_bind.cpp 21 Dec 2009 04:06:12 -0000 1.29 *************** *** 7201,7204 **** --- 7201,7205 ---- m_objectArray = wxLuaGetObjectList_wxcore(m_objectCount); m_functionArray = wxLuaGetFunctionList_wxcore(m_functionCount); + InitBinding(); } *************** *** 7272,7282 **** // --------------------------------------------------------------------------- ! bool wxLuaBinding_wxcore_init() { static wxLuaBinding_wxcore m_binding; - if (wxLuaBinding::GetBindingList()->Find(&m_binding)) return false; ! wxLuaBinding::GetBindingList()->Append(&m_binding); ! return true; } --- 7273,7284 ---- // --------------------------------------------------------------------------- ! wxLuaBinding* wxLuaBinding_wxcore_init() { static wxLuaBinding_wxcore m_binding; ! if (wxLuaBinding::GetBindingArray().Index(&m_binding) == wxNOT_FOUND) ! wxLuaBinding::GetBindingArray().Add(&m_binding); ! ! return &m_binding; } Index: wxadv_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxadv_bind.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** wxadv_bind.cpp 1 Oct 2009 04:21:01 -0000 1.26 --- wxadv_bind.cpp 21 Dec 2009 04:06:11 -0000 1.27 *************** *** 16681,16684 **** --- 16681,16685 ---- m_objectArray = wxLuaGetObjectList_wxadv(m_objectCount); m_functionArray = wxLuaGetFunctionList_wxadv(m_functionCount); + InitBinding(); } *************** *** 16687,16697 **** // --------------------------------------------------------------------------- ! bool wxLuaBinding_wxadv_init() { static wxLuaBinding_wxadv m_binding; - if (wxLuaBinding::GetBindingList()->Find(&m_binding)) return false; ! wxLuaBinding::GetBindingList()->Append(&m_binding); ! return true; } --- 16688,16699 ---- // --------------------------------------------------------------------------- ! wxLuaBinding* wxLuaBinding_wxadv_init() { static wxLuaBinding_wxadv m_binding; ! if (wxLuaBinding::GetBindingArray().Index(&m_binding) == wxNOT_FOUND) ! wxLuaBinding::GetBindingArray().Add(&m_binding); ! ! return &m_binding; } Index: wxrichtext_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxrichtext_bind.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** wxrichtext_bind.cpp 27 Sep 2009 03:13:55 -0000 1.12 --- wxrichtext_bind.cpp 21 Dec 2009 04:06:12 -0000 1.13 *************** *** 160,163 **** --- 160,164 ---- m_objectArray = wxLuaGetObjectList_wxrichtext(m_objectCount); m_functionArray = wxLuaGetFunctionList_wxrichtext(m_functionCount); + InitBinding(); } *************** *** 166,176 **** // --------------------------------------------------------------------------- ! bool wxLuaBinding_wxrichtext_init() { static wxLuaBinding_wxrichtext m_binding; - if (wxLuaBinding::GetBindingList()->Find(&m_binding)) return false; ! wxLuaBinding::GetBindingList()->Append(&m_binding); ! return true; } --- 167,178 ---- // --------------------------------------------------------------------------- ! wxLuaBinding* wxLuaBinding_wxrichtext_init() { static wxLuaBinding_wxrichtext m_binding; ! if (wxLuaBinding::GetBindingArray().Index(&m_binding) == wxNOT_FOUND) ! wxLuaBinding::GetBindingArray().Add(&m_binding); ! ! return &m_binding; } Index: wxhtml_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxhtml_bind.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wxhtml_bind.cpp 1 Oct 2009 04:21:01 -0000 1.18 --- wxhtml_bind.cpp 21 Dec 2009 04:06:12 -0000 1.19 *************** *** 5181,5184 **** --- 5181,5185 ---- m_objectArray = wxLuaGetObjectList_wxhtml(m_objectCount); m_functionArray = wxLuaGetFunctionList_wxhtml(m_functionCount); + InitBinding(); } *************** *** 5187,5197 **** // --------------------------------------------------------------------------- ! bool wxLuaBinding_wxhtml_init() { static wxLuaBinding_wxhtml m_binding; - if (wxLuaBinding::GetBindingList()->Find(&m_binding)) return false; ! wxLuaBinding::GetBindingList()->Append(&m_binding); ! return true; } --- 5188,5199 ---- // --------------------------------------------------------------------------- ! wxLuaBinding* wxLuaBinding_wxhtml_init() { static wxLuaBinding_wxhtml m_binding; ! if (wxLuaBinding::GetBindingArray().Index(&m_binding) == wxNOT_FOUND) ! wxLuaBinding::GetBindingArray().Add(&m_binding); ! ! return &m_binding; } Index: wxaui_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxaui_bind.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** wxaui_bind.cpp 1 Oct 2009 04:21:01 -0000 1.21 --- wxaui_bind.cpp 21 Dec 2009 04:06:11 -0000 1.22 *************** *** 9266,9269 **** --- 9266,9270 ---- m_objectArray = wxLuaGetObjectList_wxaui(m_objectCount); m_functionArray = wxLuaGetFunctionList_wxaui(m_functionCount); + InitBinding(); } *************** *** 9272,9282 **** // --------------------------------------------------------------------------- ! bool wxLuaBinding_wxaui_init() { static wxLuaBinding_wxaui m_binding; - if (wxLuaBinding::GetBindingList()->Find(&m_binding)) return false; ! wxLuaBinding::GetBindingList()->Append(&m_binding); ! return true; } --- 9273,9284 ---- // --------------------------------------------------------------------------- ! wxLuaBinding* wxLuaBinding_wxaui_init() { static wxLuaBinding_wxaui m_binding; ! if (wxLuaBinding::GetBindingArray().Index(&m_binding) == wxNOT_FOUND) ! wxLuaBinding::GetBindingArray().Add(&m_binding); ! ! return &m_binding; } Index: wxxml_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxxml_bind.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** wxxml_bind.cpp 1 Oct 2009 04:21:01 -0000 1.16 --- wxxml_bind.cpp 21 Dec 2009 04:06:12 -0000 1.17 *************** *** 1188,1191 **** --- 1188,1192 ---- m_objectArray = wxLuaGetObjectList_wxxml(m_objectCount); m_functionArray = wxLuaGetFunctionList_wxxml(m_functionCount); + InitBinding(); } *************** *** 1194,1204 **** // --------------------------------------------------------------------------- ! bool wxLuaBinding_wxxml_init() { static wxLuaBinding_wxxml m_binding; - if (wxLuaBinding::GetBindingList()->Find(&m_binding)) return false; ! wxLuaBinding::GetBindingList()->Append(&m_binding); ! return true; } --- 1195,1206 ---- // --------------------------------------------------------------------------- ! wxLuaBinding* wxLuaBinding_wxxml_init() { static wxLuaBinding_wxxml m_binding; ! if (wxLuaBinding::GetBindingArray().Index(&m_binding) == wxNOT_FOUND) ! wxLuaBinding::GetBindingArray().Add(&m_binding); ! ! return &m_binding; } |
From: John L. <jr...@us...> - 2009-12-21 04:06:25
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv10162/wxLua/modules/wxlua/include Modified Files: wxlbind.h wxldefs.h wxlstate.h wxlua_bind.h Log Message: Use a wxArray instead of a wxList for the wxLuaBindingArray (was List) Simplify and cleanup initializing the bindings, linking base class wxLuaBindMethods Index: wxldefs.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxldefs.h,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** wxldefs.h 1 Oct 2009 04:21:01 -0000 1.50 --- wxldefs.h 21 Dec 2009 04:06:13 -0000 1.51 *************** *** 65,69 **** //----------------------------------------------------------------------------- ! #define WXLUA_BINDING_VERSION 29 // ---------------------------------------------------------------------------- --- 65,69 ---- //----------------------------------------------------------------------------- ! #define WXLUA_BINDING_VERSION 30 // ---------------------------------------------------------------------------- Index: wxlbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlbind.h,v retrieving revision 1.91 retrieving revision 1.92 diff -C2 -d -r1.91 -r1.92 *** wxlbind.h 5 Oct 2009 02:51:29 -0000 1.91 --- wxlbind.h 21 Dec 2009 04:06:13 -0000 1.92 *************** *** 128,132 **** enum wxLuaMethod_Type { ! WXLUAMETHOD_CONSTRUCTOR = 0x0001, // constructor WXLUAMETHOD_METHOD = 0x0002, // class member function WXLUAMETHOD_CFUNCTION = 0x0004, // global C function (not part of a class) --- 128,132 ---- enum wxLuaMethod_Type { ! WXLUAMETHOD_CONSTRUCTOR = 0x0001, // class constructor WXLUAMETHOD_METHOD = 0x0002, // class member function WXLUAMETHOD_CFUNCTION = 0x0004, // global C function (not part of a class) *************** *** 140,151 **** // original class. ! WXLUAMETHOD_CHECKED_OVERLOAD = 0x10000, // Class method has been checked to see if it is ! // overloaded function from the base class by ! // wxLuaBinding::InitAllBindings(). ! // wxLuaBindMethod::basemethod is !NULL ! // if an overloaded function was found. ! ! WXLUAMETHOD_SEARCH_MASK = 0xFFFF, // Helper for wxLuaBinding::GetClassMethod(), ignore WXLUAMETHOD_CHECKED_OVERLOAD ! WXLUAMETHOD_SORT_MASK = 0xFFFF, // Helper for wxLuaBinding::InitAllBindings(), ignore WXLUAMETHOD_CHECKED_OVERLOAD }; --- 140,144 ---- // original class. ! WXLUAMETHOD_MASK = 0xFFFF // Match any type for searching }; *************** *** 175,179 **** int wxluacfuncs_n; // Number of C functions (overloaded > 1) for this method wxLuaBindMethod* basemethod; // Overloaded method from the base class, else NULL. - // See comments for WXLUAMETHOD_CHECKED_OVERLOAD }; --- 168,171 ---- *************** *** 485,490 **** // ---------------------------------------------------------------------------- ! // list of wxLua Bindings ! WX_DECLARE_USER_EXPORTED_LIST(wxLuaBinding, wxLuaBindingList, WXDLLIMPEXP_WXLUA); class WXDLLIMPEXP_WXLUA wxLuaBinding : public wxObject --- 477,482 ---- // ---------------------------------------------------------------------------- ! // wxArray of wxLua Bindings ! WX_DEFINE_USER_EXPORTED_ARRAY_PTR(wxLuaBinding*, wxLuaBindingArray, class WXDLLIMPEXP_WXLUA); class WXDLLIMPEXP_WXLUA wxLuaBinding : public wxObject *************** *** 494,497 **** --- 486,493 ---- virtual ~wxLuaBinding() {} + // Register all the bindings added to the static member wxLuaBindingArray. + // Leaves nothing on the stack. + static bool RegisterBindings(const wxLuaState& wxlState); + // Binds C Functions/Defines/Object/Events to a Lua table with binding's namespace. // The Lua table that the bindings were installed into is left on the top *************** *** 556,560 **** // ----------------------------------------------------------------------- ! // These functions search through the static wxLuaBinding::GetBindingList() // for the items. --- 552,556 ---- // ----------------------------------------------------------------------- ! // These functions search through the static wxLuaBinding::GetBindingArray() // for the items. *************** *** 600,617 **** // Get all the bindings that were initialized using the generated binding // function wxLuaBinding_[binding name]_init(). ! // You can adjust the list *only* if you do not have any wxLuaStates // created, otherwise the wxLua types will be out of sync. ! static wxLuaBindingList* GetBindingList() { return &sm_bindingList; } // ----------------------------------------------------------------------- ! // Initialize all of the bindings by iterating the GetBindingList() and // setting the base classes and base class functions. This function ! // is automatically run by the wxLuaState and should not need to be called. static void InitAllBindings(bool force_update = false); protected: ! void InitBinding(); // must called after subclassed version is created ! // to sort the bindings appropriately // Register the classes, defines, strings, events, objects, and functions --- 596,615 ---- // Get all the bindings that were initialized using the generated binding // function wxLuaBinding_[binding name]_init(). ! // You can adjust the array *only* if you do not have any wxLuaStates // created, otherwise the wxLua types will be out of sync. ! static wxLuaBindingArray& GetBindingArray() { return sm_bindingArray; } // ----------------------------------------------------------------------- ! // Initialize all of the bindings by iterating the GetBindingArray() and // setting the base classes and base class functions. This function ! // is automatically run by the wxLuaState and should not need to be called ! // unless you later add a new binding to the array, in which case force it to be rerun. static void InitAllBindings(bool force_update = false); protected: ! ! // Call only once after subclassed version is created to sort the bindings appropriately ! void InitBinding(); // Register the classes, defines, strings, events, objects, and functions *************** *** 639,645 **** int m_last_wxluatype; // The last wxLua type of registered classes ! static wxLuaBindingList sm_bindingList; ! static bool sm_bindingList_initialized; ! static int sm_wxluatype_max; DECLARE_ABSTRACT_CLASS(wxLuaBinding) --- 637,643 ---- int m_last_wxluatype; // The last wxLua type of registered classes ! static wxLuaBindingArray sm_bindingArray; ! static int sm_bindingArray_initialized; ! static int sm_wxluatype_max; DECLARE_ABSTRACT_CLASS(wxLuaBinding) Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.127 retrieving revision 1.128 diff -C2 -d -r1.127 -r1.128 *** wxlstate.h 5 Oct 2009 02:51:29 -0000 1.127 --- wxlstate.h 21 Dec 2009 04:06:13 -0000 1.128 *************** *** 417,421 **** WXDLLIMPEXP_WXLUA const wxLuaBindClass* LUACALL wxluaT_getclass(lua_State* L, const char* class_name); ! // Is the item at stack_idx of the userdata type with or derived from the the given wxLua type. WXDLLIMPEXP_WXLUA bool wxluaT_isuserdatatype(lua_State* L, int stack_idx, int wxl_type); // Get the userdata object at the stack_idx that is of the wxLua class type or a --- 417,421 ---- WXDLLIMPEXP_WXLUA const wxLuaBindClass* LUACALL wxluaT_getclass(lua_State* L, const char* class_name); ! // Is the item at stack_idx of the userdata type or derived from the the given wxLua type. WXDLLIMPEXP_WXLUA bool wxluaT_isuserdatatype(lua_State* L, int stack_idx, int wxl_type); // Get the userdata object at the stack_idx that is of the wxLua class type or a *************** *** 914,921 **** // See wxluaT_isderivedtype(). int IsDerivedType(int wxl_type, int base_wxl_type, int* baseclass_n) const; - // Get wxLuaBindEvent for given wxEventType (wxEvent::GetEventType()) by finding - // the matching wxLuaBindEvent::eventType. - // See wxLuaBinding::GetBindEvent(). - const wxLuaBindEvent* GetBindEvent(wxEventType eventType) const; // See wxlua_setcallbaseclassfunction() and wxlua_getcallbaseclassfunction(). --- 914,917 ---- Index: wxlua_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlua_bind.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** wxlua_bind.h 1 Oct 2009 04:21:01 -0000 1.20 --- wxlua_bind.h 21 Dec 2009 04:06:13 -0000 1.21 *************** *** 17,23 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- --- 17,23 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 30 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 30 // --------------------------------------------------------------------------- *************** *** 36,40 **** // initialize wxLuaBinding_wxlua for all wxLuaStates ! extern WXDLLIMPEXP_WXLUA bool wxLuaBinding_wxlua_init(); // --------------------------------------------------------------------------- --- 36,40 ---- // initialize wxLuaBinding_wxlua for all wxLuaStates ! extern WXDLLIMPEXP_WXLUA wxLuaBinding* wxLuaBinding_wxlua_init(); // --------------------------------------------------------------------------- |
From: John L. <jr...@us...> - 2009-12-21 04:06:22
|
Update of /cvsroot/wxlua/wxLua/samples In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv10162/wxLua/samples Modified Files: bindings.wx.lua controls.wx.lua Log Message: Use a wxArray instead of a wxList for the wxLuaBindingArray (was List) Simplify and cleanup initializing the bindings, linking base class wxLuaBindMethods Index: controls.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/controls.wx.lua,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** controls.wx.lua 5 Oct 2009 02:51:29 -0000 1.20 --- controls.wx.lua 21 Dec 2009 04:06:14 -0000 1.21 *************** *** 341,345 **** function OnEvent(event) local skip = true ! local evtClassName = wxlua.typename(wxEVT_TableByType[event:GetEventType()].wxluatype) local evtTypeStr = wxEVT_TableByType[event:GetEventType()].name --- 341,345 ---- function OnEvent(event) local skip = true ! local evtClassName = wxlua.type(event) local evtTypeStr = wxEVT_TableByType[event:GetEventType()].name Index: bindings.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/bindings.wx.lua,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** bindings.wx.lua 1 Oct 2009 04:21:02 -0000 1.26 --- bindings.wx.lua 21 Dec 2009 04:06:14 -0000 1.27 *************** *** 293,297 **** -- subtract values from high to low value - t = HasBit(t, wxlua.WXLUAMETHOD_CHECKED_OVERLOAD, nil, nil) -- nobody should care about this t = HasBit(t, wxlua.WXLUAMETHOD_DELETE, s, "Delete") t = HasBit(t, wxlua.WXLUAMETHOD_STATIC, s, "Static") --- 293,296 ---- *************** *** 304,310 **** assert(t == 0, "The wxLuaMethod_Type is not handled correctly, remainder "..tostring(t).." of "..tostring(t_)) - -- remove this, nobody should care and it'll probably be confusing - t = HasBit(t_, wxlua.WXLUAMETHOD_CHECKED_OVERLOAD, nil, nil) - return string.format("0x%04X (%s)", t, table.concat(s, ", ")) end --- 303,306 ---- |
From: John L. <jr...@us...> - 2009-12-21 04:06:22
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv10162/wxLua/modules/wxlua/src Modified Files: wxlbind.cpp wxlcallb.cpp wxlstate.cpp wxlua_bind.cpp Log Message: Use a wxArray instead of a wxList for the wxLuaBindingArray (was List) Simplify and cleanup initializing the bindings, linking base class wxLuaBindMethods Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.186 retrieving revision 1.187 diff -C2 -d -r1.186 -r1.187 *** wxlstate.cpp 23 Nov 2009 05:28:54 -0000 1.186 --- wxlstate.cpp 21 Dec 2009 04:06:14 -0000 1.187 *************** *** 82,87 **** for (i = 1; i <= n; ++i) { - if (i > 1) msg.Append(wxT("\t")); // Lua uses a tab too in luaB_print - const char *s; lua_pushvalue(L, -1); /* function to be called */ --- 82,85 ---- *************** *** 95,99 **** --- 93,100 ---- LUA_QL("print")); } + + if (i > 1) msg.Append(wxT("\t")); // Lua uses a tab too in luaB_print msg += lua2wx(s); + lua_pop(L, 1); /* pop result */ } *************** *** 136,142 **** } - // Assume they've set the wxEvtHandler, ok if not, but it wouldn't make sense // We use wxLuaState::SendEvent() because it sets wxEvent::SetEventObject() for us. ! if (wxlStateData->m_lua_debug_hook_send_evt) { wxLuaState wxlState(L); --- 137,142 ---- } // We use wxLuaState::SendEvent() because it sets wxEvent::SetEventObject() for us. ! if (wxlStateData->m_lua_debug_hook_send_evt && wxlStateData->m_evtHandler) { wxLuaState wxlState(L); *************** *** 2957,2974 **** { wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); - wxLuaBinding::InitAllBindings(); // only runs the first time through - - // Register bindings - wxLuaBindingList::compatibility_iterator node = wxLuaBinding::GetBindingList()->GetFirst(); - while (node) - { - wxLuaBinding* binding = node->GetData(); - binding->RegisterBinding(*this); - lua_Pop(1); // pop the Lua table the binding was installed into ! node = node->GetNext(); ! } ! ! return true; } --- 2957,2962 ---- { wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState")); ! return wxLuaBinding::RegisterBindings(*this); } *************** *** 3014,3023 **** } - const wxLuaBindEvent* wxLuaState::GetBindEvent(wxEventType eventType) const - { - wxCHECK_MSG(Ok(), NULL, wxT("Invalid wxLuaState")); - return wxLuaBinding::FindBindEvent(eventType); - } - void wxLuaState::SetCallBaseClassFunction(bool call_base) { --- 3002,3005 ---- Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.126 retrieving revision 1.127 diff -C2 -d -r1.126 -r1.127 *** wxlbind.cpp 5 Oct 2009 02:51:29 -0000 1.126 --- wxlbind.cpp 21 Dec 2009 04:06:13 -0000 1.127 *************** *** 26,32 **** - #include "wx/listimpl.cpp" - WX_DEFINE_LIST(wxLuaBindingList); - wxLuaArgType g_wxluaargtypeArray_None[1] = {0}; --- 26,29 ---- *************** *** 883,913 **** // Function to compare to wxLuaBindEvents by eventType ! int wxLuaBindEventArrayCompareFn(const void *p1, const void *p2) { return (*((const wxLuaBindEvent*)p1)->eventType) - (*((const wxLuaBindEvent*)p2)->eventType); } // Function to compare to wxLuaBindNumber by name ! int wxLuaBindNumberArrayCompareFn(const void *p1, const void *p2) { return strcmp(((const wxLuaBindNumber*)p1)->name, ((const wxLuaBindNumber*)p2)->name); } // Function to compare to wxLuaBindStrings by name ! int wxLuaBindStringArrayCompareFn(const void *p1, const void *p2) { return strcmp(((const wxLuaBindString*)p1)->name, ((const wxLuaBindString*)p2)->name); } // Function to compare to wxLuaBindObjects by name ! int wxLuaBindObjectArrayCompareFn(const void *p1, const void *p2) { return strcmp(((const wxLuaBindObject*)p1)->name, ((const wxLuaBindObject*)p2)->name); } // Function to compare to wxLuaBindMethods by name ! int wxLuaBindMethodArrayCompareFnInit(const void *p1, const void *p2) { int v = strcmp(((const wxLuaBindMethod*)p1)->name, ((const wxLuaBindMethod*)p2)->name); if (v == 0) { ! int t1 = WXLUAMETHOD_SORT_MASK & ((const wxLuaBindMethod*)p1)->method_type; ! int t2 = WXLUAMETHOD_SORT_MASK & ((const wxLuaBindMethod*)p2)->method_type; v = t1 - t2; } --- 880,910 ---- // Function to compare to wxLuaBindEvents by eventType ! int wxLuaBindEvent_CompareByEventTypeFn(const void *p1, const void *p2) { return (*((const wxLuaBindEvent*)p1)->eventType) - (*((const wxLuaBindEvent*)p2)->eventType); } // Function to compare to wxLuaBindNumber by name ! int wxLuaBindNumber_CompareByNameFn(const void *p1, const void *p2) { return strcmp(((const wxLuaBindNumber*)p1)->name, ((const wxLuaBindNumber*)p2)->name); } // Function to compare to wxLuaBindStrings by name ! int wxLuaBindString_CompareByNameFn(const void *p1, const void *p2) { return strcmp(((const wxLuaBindString*)p1)->name, ((const wxLuaBindString*)p2)->name); } // Function to compare to wxLuaBindObjects by name ! int wxLuaBindObject_CompareByNameFn(const void *p1, const void *p2) { return strcmp(((const wxLuaBindObject*)p1)->name, ((const wxLuaBindObject*)p2)->name); } // Function to compare to wxLuaBindMethods by name ! int wxLuaBindMethod_CompareByNameFnInit(const void *p1, const void *p2) { int v = strcmp(((const wxLuaBindMethod*)p1)->name, ((const wxLuaBindMethod*)p2)->name); if (v == 0) { ! int t1 = ((const wxLuaBindMethod*)p1)->method_type; ! int t2 = ((const wxLuaBindMethod*)p2)->method_type; v = t1 - t2; } *************** *** 918,928 **** } // Function for wxLuaBinding::GetClassMethod() ! int wxLuaBindMethodArrayCompareFnGet(const void *p1, const void *p2) { int v = strcmp(((const wxLuaBindMethod*)p1)->name, ((const wxLuaBindMethod*)p2)->name); if (v == 0) { ! int t1 = WXLUAMETHOD_SEARCH_MASK & ((const wxLuaBindMethod*)p1)->method_type; ! int t2 = WXLUAMETHOD_SEARCH_MASK & ((const wxLuaBindMethod*)p2)->method_type; if ((t1 & t2) != 0) return 0; // any matched bits will work --- 915,925 ---- } // Function for wxLuaBinding::GetClassMethod() ! int wxLuaBindMethod_CompareByNameFnGet(const void *p1, const void *p2) { int v = strcmp(((const wxLuaBindMethod*)p1)->name, ((const wxLuaBindMethod*)p2)->name); if (v == 0) { ! int t1 = ((const wxLuaBindMethod*)p1)->method_type; ! int t2 = ((const wxLuaBindMethod*)p2)->method_type; if ((t1 & t2) != 0) return 0; // any matched bits will work *************** *** 934,943 **** } // Function to compare the wxLuaBindClasses by name ! int wxLuaBindClassArrayCompareFn(const void *p1, const void *p2) { return strcmp(((const wxLuaBindClass*)p1)->name, ((const wxLuaBindClass*)p2)->name); } // Function to compare the wxLuaBindClasses by wxluatype ! int wxLuaBindClassArrayCompareBywxLuaType(const void *p1, const void *p2) { return (*((const wxLuaBindClass*)p1)->wxluatype) - (*((const wxLuaBindClass*)p2)->wxluatype); --- 931,940 ---- } // Function to compare the wxLuaBindClasses by name ! int wxLuaBindClass_CompareByNameFn(const void *p1, const void *p2) { return strcmp(((const wxLuaBindClass*)p1)->name, ((const wxLuaBindClass*)p2)->name); } // Function to compare the wxLuaBindClasses by wxluatype ! int wxLuaBindClass_CompareBywxLuaTypeFn(const void *p1, const void *p2) { return (*((const wxLuaBindClass*)p1)->wxluatype) - (*((const wxLuaBindClass*)p2)->wxluatype); *************** *** 950,955 **** IMPLEMENT_ABSTRACT_CLASS(wxLuaBinding, wxObject) ! wxLuaBindingList wxLuaBinding::sm_bindingList; ! bool wxLuaBinding::sm_bindingList_initialized = false; int wxLuaBinding::sm_wxluatype_max = WXLUA_T_MAX+1; // highest wxLua type initially --- 947,952 ---- IMPLEMENT_ABSTRACT_CLASS(wxLuaBinding, wxObject) ! wxLuaBindingArray wxLuaBinding::sm_bindingArray; ! int wxLuaBinding::sm_bindingArray_initialized = 0; int wxLuaBinding::sm_wxluatype_max = WXLUA_T_MAX+1; // highest wxLua type initially *************** *** 976,980 **** return; ! qsort(m_classArray, m_classCount, sizeof(wxLuaBindClass), wxLuaBindClassArrayCompareFn); wxLuaBindClass* wxlClass = m_classArray; --- 973,977 ---- return; ! qsort(m_classArray, m_classCount, sizeof(wxLuaBindClass), wxLuaBindClass_CompareByNameFn); wxLuaBindClass* wxlClass = m_classArray; *************** *** 985,992 **** // Also sort the member functions for each class if (wxlClass->wxluamethods && (wxlClass->wxluamethods_n > 0)) ! qsort(wxlClass->wxluamethods, wxlClass->wxluamethods_n, sizeof(wxLuaBindMethod), wxLuaBindMethodArrayCompareFnInit); // And their enums if (wxlClass->enums && (wxlClass->enums_n > 0)) ! qsort(wxlClass->enums, wxlClass->enums_n, sizeof(wxLuaBindNumber), wxLuaBindNumberArrayCompareFn); } --- 982,989 ---- // Also sort the member functions for each class if (wxlClass->wxluamethods && (wxlClass->wxluamethods_n > 0)) ! qsort(wxlClass->wxluamethods, wxlClass->wxluamethods_n, sizeof(wxLuaBindMethod), wxLuaBindMethod_CompareByNameFnInit); // And their enums if (wxlClass->enums && (wxlClass->enums_n > 0)) ! qsort(wxlClass->enums, wxlClass->enums_n, sizeof(wxLuaBindNumber), wxLuaBindNumber_CompareByNameFn); } *************** *** 997,1011 **** if (m_numberArray && (m_numberCount > 0)) ! qsort(m_numberArray, m_numberCount, sizeof(wxLuaBindNumber), wxLuaBindNumberArrayCompareFn); if (m_stringArray && (m_stringCount > 0)) ! qsort(m_stringArray, m_stringCount, sizeof(wxLuaBindString), wxLuaBindStringArrayCompareFn); // sort by event type for fastest lookup if (m_eventArray && (m_eventCount > 0)) ! qsort(m_eventArray, m_eventCount, sizeof(wxLuaBindEvent), wxLuaBindEventArrayCompareFn); if (m_objectArray && (m_objectCount > 0)) ! qsort(m_objectArray, m_objectCount, sizeof(wxLuaBindObject), wxLuaBindObjectArrayCompareFn); } --- 994,1027 ---- if (m_numberArray && (m_numberCount > 0)) ! qsort(m_numberArray, m_numberCount, sizeof(wxLuaBindNumber), wxLuaBindNumber_CompareByNameFn); if (m_stringArray && (m_stringCount > 0)) ! qsort(m_stringArray, m_stringCount, sizeof(wxLuaBindString), wxLuaBindString_CompareByNameFn); // sort by event type for fastest lookup if (m_eventArray && (m_eventCount > 0)) ! qsort(m_eventArray, m_eventCount, sizeof(wxLuaBindEvent), wxLuaBindEvent_CompareByEventTypeFn); if (m_objectArray && (m_objectCount > 0)) ! qsort(m_objectArray, m_objectCount, sizeof(wxLuaBindObject), wxLuaBindObject_CompareByNameFn); ! } ! ! // static ! bool wxLuaBinding::RegisterBindings(const wxLuaState& wxlState) ! { ! wxCHECK_MSG(wxlState.Ok(), false, wxT("Invalid wxLuaState")); ! ! lua_State *L = wxlState.GetLuaState(); ! size_t n, binding_count = sm_bindingArray.GetCount(); ! ! wxLuaBinding::InitAllBindings(); // only runs the first time through ! ! for (n = 0; n < binding_count; ++n) ! { ! sm_bindingArray[n]->RegisterBinding(wxlState); ! lua_pop(L, 1); // pop the Lua table the binding was installed into ! } ! ! return true; } *************** *** 1319,1323 **** m_eventCount, sizeof(wxLuaBindEvent), ! wxLuaBindEventArrayCompareFn); return pLuaEvent; } --- 1335,1339 ---- m_eventCount, sizeof(wxLuaBindEvent), ! wxLuaBindEvent_CompareByEventTypeFn); return pLuaEvent; } *************** *** 1335,1344 **** // this relies on LUA allocating the wxLua types in ascending order of definition ! // if LUA stops doing this, then the search may break. const wxLuaBindClass *wxlClass = (wxLuaBindClass *)bsearch(&classItem, m_classArray, m_classCount, sizeof(wxLuaBindClass), ! wxLuaBindClassArrayCompareBywxLuaType); return wxlClass; --- 1351,1361 ---- // this relies on LUA allocating the wxLua types in ascending order of definition ! // if LUA stops doing this, then the search may break. Note that we initially ! // sort the classes by name then allocate types in acending order. const wxLuaBindClass *wxlClass = (wxLuaBindClass *)bsearch(&classItem, m_classArray, m_classCount, sizeof(wxLuaBindClass), ! wxLuaBindClass_CompareBywxLuaTypeFn); return wxlClass; *************** *** 1349,1359 **** wxLuaBindClass classItem = { className, 0, 0, 0, 0, 0, 0, 0, 0 }; - // this relies on LUA allocating the wxLua types in ascending order of definition - // if LUA stops doing this, then the search may break. const wxLuaBindClass *wxlClass = (wxLuaBindClass *)bsearch(&classItem, m_classArray, m_classCount, sizeof(wxLuaBindClass), ! wxLuaBindClassArrayCompareFn); return wxlClass; --- 1366,1374 ---- wxLuaBindClass classItem = { className, 0, 0, 0, 0, 0, 0, 0, 0 }; const wxLuaBindClass *wxlClass = (wxLuaBindClass *)bsearch(&classItem, m_classArray, m_classCount, sizeof(wxLuaBindClass), ! wxLuaBindClass_CompareByNameFn); return wxlClass; *************** *** 1362,1374 **** const wxLuaBindClass* wxLuaBinding::GetBindClass(const wxLuaBindMethod* wxlMethod_tofind) const { wxLuaBindClass* wxlClass = m_classArray; wxLuaBindMethod* wxlMethod = NULL; ! for (size_t c = 0; c < m_classCount; ++c, ++wxlClass) { wxlMethod = wxlClass->wxluamethods; ! int m , wxluamethods_n = wxlClass->wxluamethods_n; ! for (m = 0; m < wxluamethods_n; ++m, ++wxlMethod) { if (wxlMethod == wxlMethod_tofind) --- 1377,1390 ---- const wxLuaBindClass* wxLuaBinding::GetBindClass(const wxLuaBindMethod* wxlMethod_tofind) const { + size_t c, m, methods_n; wxLuaBindClass* wxlClass = m_classArray; wxLuaBindMethod* wxlMethod = NULL; ! for (c = 0; c < m_classCount; ++c, ++wxlClass) { wxlMethod = wxlClass->wxluamethods; ! methods_n = wxlClass->wxluamethods_n; ! for (m = 0; m < methods_n; ++m, ++wxlMethod) { if (wxlMethod == wxlMethod_tofind) *************** *** 1413,1425 **** wxLuaBinding* wxLuaBinding::GetLuaBinding(const wxString& bindingName) { ! wxLuaBindingList::compatibility_iterator node = sm_bindingList.GetFirst(); ! while (node) { ! wxLuaBinding* binding = node->GetData(); ! if (binding->GetBindingName() == bindingName) ! return binding; ! ! node = node->GetNext(); } --- 1429,1438 ---- wxLuaBinding* wxLuaBinding::GetLuaBinding(const wxString& bindingName) { ! size_t i, binding_count = sm_bindingArray.GetCount(); ! for (i = 0; i < binding_count; ++i) { ! if (sm_bindingArray[i]->GetBindingName() == bindingName) ! return sm_bindingArray[i]; } *************** *** 1430,1444 **** const wxLuaBindClass* wxLuaBinding::FindBindClass(const char* className) { ! wxLuaBindingList::compatibility_iterator node = sm_bindingList.GetFirst(); ! while (node) { ! wxLuaBinding* binding = node->GetData(); ! const wxLuaBindClass* wxlClass = binding->GetBindClass(className); if (wxlClass) return wxlClass; - - node = node->GetNext(); } --- 1443,1454 ---- const wxLuaBindClass* wxLuaBinding::FindBindClass(const char* className) { ! size_t i, binding_count = sm_bindingArray.GetCount(); ! for (i = 0; i < binding_count; ++i) { ! const wxLuaBindClass* wxlClass = sm_bindingArray[i]->GetBindClass(className); if (wxlClass) return wxlClass; } *************** *** 1449,1463 **** const wxLuaBindClass* wxLuaBinding::FindBindClass(int wxluatype) { ! wxLuaBindingList::compatibility_iterator node = sm_bindingList.GetFirst(); ! while (node) { ! wxLuaBinding* binding = node->GetData(); ! const wxLuaBindClass* wxlClass = binding->GetBindClass(wxluatype); if (wxlClass) return wxlClass; - - node = node->GetNext(); } --- 1459,1470 ---- const wxLuaBindClass* wxLuaBinding::FindBindClass(int wxluatype) { ! size_t i, binding_count = sm_bindingArray.GetCount(); ! for (i = 0; i < binding_count; ++i) { ! const wxLuaBindClass* wxlClass = sm_bindingArray[i]->GetBindClass(wxluatype); if (wxlClass) return wxlClass; } *************** *** 1468,1482 **** const wxLuaBindClass* wxLuaBinding::FindBindClass(const wxLuaBindMethod* wxlMethod) { ! wxLuaBindingList::compatibility_iterator node = sm_bindingList.GetFirst(); ! while (node) { ! wxLuaBinding* binding = node->GetData(); ! const wxLuaBindClass* wxlClass = binding->GetBindClass(wxlMethod); if (wxlClass) return wxlClass; - - node = node->GetNext(); } --- 1475,1486 ---- const wxLuaBindClass* wxLuaBinding::FindBindClass(const wxLuaBindMethod* wxlMethod) { ! size_t i, binding_count = sm_bindingArray.GetCount(); ! for (i = 0; i < binding_count; ++i) { ! const wxLuaBindClass* wxlClass = sm_bindingArray[i]->GetBindClass(wxlMethod); if (wxlClass) return wxlClass; } *************** *** 1487,1501 **** const wxLuaBindClass* wxLuaBinding::FindBindClass(const wxLuaBindCFunc* wxlCFunc) { ! wxLuaBindingList::compatibility_iterator node = sm_bindingList.GetFirst(); ! while (node) { ! wxLuaBinding* binding = node->GetData(); ! const wxLuaBindClass* wxlClass = binding->GetBindClass(wxlCFunc); if (wxlClass) return wxlClass; - - node = node->GetNext(); } --- 1491,1502 ---- const wxLuaBindClass* wxLuaBinding::FindBindClass(const wxLuaBindCFunc* wxlCFunc) { ! size_t i, binding_count = sm_bindingArray.GetCount(); ! for (i = 0; i < binding_count; ++i) { ! const wxLuaBindClass* wxlClass = sm_bindingArray[i]->GetBindClass(wxlCFunc); if (wxlClass) return wxlClass; } *************** *** 1506,1520 **** const wxLuaBindEvent* wxLuaBinding::FindBindEvent(wxEventType eventType) { ! wxLuaBindingList::compatibility_iterator node = sm_bindingList.GetFirst(); ! while (node) { ! wxLuaBinding* binding = node->GetData(); ! const wxLuaBindEvent* wxlEvent = binding->GetBindEvent(eventType); if (wxlEvent) return wxlEvent; - - node = node->GetNext(); } --- 1507,1518 ---- const wxLuaBindEvent* wxLuaBinding::FindBindEvent(wxEventType eventType) { ! size_t i, binding_count = sm_bindingArray.GetCount(); ! for (i = 0; i < binding_count; ++i) { ! const wxLuaBindEvent* wxlEvent = sm_bindingArray[i]->GetBindEvent(eventType); if (wxlEvent) return wxlEvent; } *************** *** 1525,1543 **** wxLuaBinding* wxLuaBinding::FindMethodBinding(const wxLuaBindMethod* wxlMethod) { ! wxLuaBindingList::compatibility_iterator node = sm_bindingList.GetFirst(); ! while (node) { ! wxLuaBinding* binding = node->GetData(); ! size_t n, count = binding->GetFunctionCount(); ! wxLuaBindMethod* m = binding->GetFunctionArray(); ! for (n = 0; n < count; ++n, ++m) { if (m == wxlMethod) ! return binding; } - - node = node->GetNext(); } --- 1523,1538 ---- wxLuaBinding* wxLuaBinding::FindMethodBinding(const wxLuaBindMethod* wxlMethod) { ! size_t i, binding_count = sm_bindingArray.GetCount(); ! for (i = 0; i < binding_count; ++i) { ! size_t j, fn_count = sm_bindingArray[i]->GetFunctionCount(); ! wxLuaBindMethod* m = sm_bindingArray[i]->GetFunctionArray(); ! for (j = 0; j < fn_count; ++j, ++m) { if (m == wxlMethod) ! return sm_bindingArray[i]; } } *************** *** 1553,1558 **** wxCHECK_MSG(wxlClass, NULL, wxT("Invalid wxLuaBindClass to find method from.")); - #if 1 - wxLuaBindMethod methodItem = { methodName, method_type, 0, 0, 0 }; --- 1548,1551 ---- *************** *** 1561,1565 **** wxlClass->wxluamethods_n, sizeof(wxLuaBindMethod), ! wxLuaBindMethodArrayCompareFnGet); if ((wxlMethod == NULL) && search_baseclasses && wxlClass->baseclassNames) --- 1554,1558 ---- wxlClass->wxluamethods_n, sizeof(wxLuaBindMethod), ! wxLuaBindMethod_CompareByNameFnGet); if ((wxlMethod == NULL) && search_baseclasses && wxlClass->baseclassNames) *************** *** 1567,1596 **** for (size_t i = 0; wxlClass->baseclassNames[i]; ++i) { ! wxlMethod = GetClassMethod(wxlClass->baseBindClasses[i], methodName, method_type, search_baseclasses); ! if (wxlMethod != NULL) ! return wxlMethod; ! } ! } ! ! #else ! ! wxLuaBindMethod *wxlMethod = wxlClass->wxluamethods; ! int i_method, method_count = wxlClass->wxluamethods_n; ! ! // find a method in the class, recurse through classes from which this class is derived. ! for (i_method = 0; i_method < method_count; ++i_method, ++wxlMethod) ! { ! if (WXLUA_HASBIT(wxlMethod->type, method_type) ! && (strcmp(wxlMethod->name, methodName) == 0)) ! { ! return wxlMethod; } } - if (search_baseclasses && wxlClass->baseclass) - return GetClassMethod(wxlClass->baseclass, methodName, method_type, search_baseclasses); - - #endif - return wxlMethod; } --- 1560,1573 ---- for (size_t i = 0; wxlClass->baseclassNames[i]; ++i) { ! // The class may not have been installed ! if (wxlClass->baseBindClasses[i]) ! { ! wxlMethod = GetClassMethod(wxlClass->baseBindClasses[i], methodName, method_type, search_baseclasses); ! if (wxlMethod != NULL) ! return wxlMethod; ! } } } return wxlMethod; } *************** *** 1598,1659 **** // -------------------------------------------------------------------------- - static void wxLuaBinding_RecurseBaseMethods(wxLuaBindClass* wxlClass, wxLuaBindMethod* wxlMethod, bool force_update) - { - // iterate through the base classes to find if this function is - // an overload, but only if we haven't checked already. - if (force_update || !WXLUA_HASBIT(wxlMethod->method_type, WXLUAMETHOD_CHECKED_OVERLOAD|WXLUAMETHOD_DELETE)) - { - wxLuaBindMethod *parentMethod = wxlMethod; - - // Use the baseclassNames to check for terminating NULL - for (size_t i = 0; wxlClass->baseclassNames && wxlClass->baseclassNames[i]; ++i) - { - // Note that these may be NULL if the lib/module containing them wasn't loaded - wxLuaBindClass *baseClass = wxlClass->baseBindClasses[i]; - if (baseClass != NULL) - { - parentMethod->method_type |= WXLUAMETHOD_CHECKED_OVERLOAD; // have checked parent - - wxLuaBindMethod* baseMethod = wxLuaBinding::GetClassMethod(baseClass, wxlMethod->name, WXLUAMETHOD_SEARCH_MASK, false); - if (baseMethod) - { - // don't link to base class delete functions - if (!WXLUA_HASBIT(baseMethod->method_type, WXLUAMETHOD_DELETE)) - { - parentMethod->basemethod = baseMethod; - parentMethod = baseMethod; - } - - // we have already checked the base classes below this - if (!WXLUA_HASBIT(baseMethod->method_type, WXLUAMETHOD_CHECKED_OVERLOAD)) - wxLuaBinding_RecurseBaseMethods(baseClass, parentMethod, force_update); - } - } - } - } - } - // static void wxLuaBinding::InitAllBindings(bool force_update) { ! if (sm_bindingList_initialized && !force_update) return; ! ! // Initialize the bindings, sort and set the wxLua types ! wxLuaBindingList::compatibility_iterator node = sm_bindingList.GetFirst(); ! while (node) ! { ! wxLuaBinding* binding = node->GetData(); ! binding->InitBinding(); ! node = node->GetNext(); ! } // set the base class wxLuaBindClass* using the base class names of the parent wxLuaBindClass ! node = sm_bindingList.GetFirst(); ! while (node) { ! wxLuaBinding* binding = node->GetData(); ! wxLuaBindClass* wxlClass = binding->GetClassArray(); ! size_t i, class_count = binding->GetClassCount(); for (i = 0; i < class_count; ++i, ++wxlClass) --- 1575,1592 ---- // -------------------------------------------------------------------------- // static void wxLuaBinding::InitAllBindings(bool force_update) { ! size_t n, i, j, k, binding_count = sm_bindingArray.GetCount(); ! // update if a binding was added or removed ! if ((sm_bindingArray_initialized == binding_count) && !force_update) ! return; // set the base class wxLuaBindClass* using the base class names of the parent wxLuaBindClass ! for (n = 0; n < binding_count; ++n) { ! wxLuaBindClass* wxlClass = sm_bindingArray[n]->GetClassArray(); ! size_t class_count = sm_bindingArray[n]->GetClassCount(); for (i = 0; i < class_count; ++i, ++wxlClass) *************** *** 1662,1666 **** { // find the base class using their names in the bindings ! for (size_t j = 0; wxlClass->baseclassNames[j]; ++j) { wxLuaBindClass* wxlBaseClass = (wxLuaBindClass*)wxLuaBinding::FindBindClass(wxlClass->baseclassNames[j]); --- 1595,1599 ---- { // find the base class using their names in the bindings ! for (j = 0; wxlClass->baseclassNames[j]; ++j) { wxLuaBindClass* wxlBaseClass = (wxLuaBindClass*)wxLuaBinding::FindBindClass(wxlClass->baseclassNames[j]); *************** *** 1670,1685 **** } } - - node = node->GetNext(); } // Link together all of the class member functions with base class functions // with the same name so the overloads work for them too. ! node = sm_bindingList.GetFirst(); ! while (node) { ! wxLuaBinding* binding = node->GetData(); ! wxLuaBindClass* wxlClass = binding->GetClassArray(); ! size_t i, class_count = binding->GetClassCount(); for (i = 0; i < class_count; ++i, ++wxlClass) --- 1603,1614 ---- } } } // Link together all of the class member functions with base class functions // with the same name so the overloads work for them too. ! for (n = 0; n < binding_count; ++n) { ! wxLuaBindClass* wxlClass = sm_bindingArray[n]->GetClassArray(); ! size_t i, class_count = sm_bindingArray[n]->GetClassCount(); for (i = 0; i < class_count; ++i, ++wxlClass) *************** *** 1688,1703 **** { wxLuaBindMethod *wxlMethod = wxlClass->wxluamethods; ! size_t j, method_count = wxlClass->wxluamethods_n; for (j = 0; j < method_count; ++j, ++wxlMethod) { ! wxLuaBinding_RecurseBaseMethods(wxlClass, wxlMethod, force_update); } } } - - node = node->GetNext(); } ! sm_bindingList_initialized = true; } --- 1617,1648 ---- { wxLuaBindMethod *wxlMethod = wxlClass->wxluamethods; ! size_t method_count = wxlClass->wxluamethods_n; for (j = 0; j < method_count; ++j, ++wxlMethod) { ! if (wxlClass->baseclassNames && !WXLUA_HASBIT(wxlMethod->method_type, WXLUAMETHOD_DELETE)) ! { ! // Use the baseclassNames to check for terminating NULL ! for (k = 0; wxlClass->baseclassNames[k]; ++k) ! { ! // Note that these may be NULL if the lib/module containing them wasn't loaded ! wxLuaBindClass *baseClass = wxlClass->baseBindClasses[k]; ! if (baseClass != NULL) ! { ! wxLuaBindMethod* baseMethod = wxLuaBinding::GetClassMethod(baseClass, wxlMethod->name, WXLUAMETHOD_MASK, true); ! if (baseMethod) ! { ! // don't link to base class delete functions ! if (!WXLUA_HASBIT(baseMethod->method_type, WXLUAMETHOD_DELETE)) ! wxlMethod->basemethod = baseMethod; ! } ! } ! } ! } } } } } ! sm_bindingArray_initialized = binding_count; } Index: wxlcallb.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlcallb.cpp,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** wxlcallb.cpp 5 Oct 2009 02:51:29 -0000 1.61 --- wxlcallb.cpp 21 Dec 2009 04:06:14 -0000 1.62 *************** *** 58,62 **** m_last_id = last_id; ! m_wxlBindEvent = wxlState.GetBindEvent(eventType); // Do not install this invalid or unknown event type since we won't know --- 58,65 ---- m_last_id = last_id; ! // NOTE: FIXME? We look for the wxLuaBindEvent in all of the bindings, but it ! // may not have actually been installed if someone had modified the bindings. ! // It should be ok since it will error out soon enough without crashing. ! m_wxlBindEvent = wxLuaBinding::FindBindEvent(eventType); // Do not install this invalid or unknown event type since we won't know *************** *** 64,68 **** if (m_wxlBindEvent == NULL) { ! return wxString::Format(wxT("wxLua: Invalid or unknown wxEventType for wxEvtHandler::Connect() : %d, winIds %d, %d."), (int)eventType, win_id, last_id); } --- 67,71 ---- if (m_wxlBindEvent == NULL) { ! return wxString::Format(wxT("wxLua: Invalid or unknown wxEventType %d for wxEvtHandler::Connect(). winIds %d, %d."), (int)eventType, win_id, last_id); } *************** *** 85,90 **** void wxLuaEventCallback::ClearwxLuaState() { ! if (m_wxlState.Ok()) ! m_wxlState.UnRef(); } --- 88,92 ---- void wxLuaEventCallback::ClearwxLuaState() { ! m_wxlState.UnRef(); // ok if it's not Ok() } *************** *** 128,131 **** --- 130,136 ---- void wxLuaEventCallback::OnEvent(wxEvent *event) { + static wxClassInfo* wxSpinEvent_ClassInfo = wxClassInfo::FindClass(wxT("wxSpinEvent")); + static wxClassInfo* wxScrollEvent_ClassInfo = wxClassInfo::FindClass(wxT("wxScrollEvent")); + // Cannot call it if Lua is gone or the interpreter has been destroyed // This can happen when the program exits since windows may be destroyed *************** *** 145,160 **** event_wxl_type = *m_wxlBindEvent->wxluatype; ! // These wxEventTypes can be wxScrollEvents or wxSpinEvents - FIXME this could be cleaner // wxEVT_SCROLL_LINEUP, wxEVT_SCROLL_LINEDOWN, wxEVT_SCROLL_THUMBTRACK - //if ((strcmp(m_wxlBindEvent->name, "wxScrollEvent") == 0) && if ((*m_wxlBindEvent->wxluatype == *p_wxluatype_wxScrollEvent) && ! (wxStrcmp(event->GetClassInfo()->GetClassName(), wxT("wxSpinEvent")) == 0)) { ! if (*p_wxluatype_wxEvent != WXLUA_TUNKNOWN) event_wxl_type = *p_wxluatype_wxSpinEvent; else event_wxl_type = *p_wxluatype_wxEvent; // get the generic wxluatype_wxEvent } } --- 150,172 ---- event_wxl_type = *m_wxlBindEvent->wxluatype; ! // These wxEventTypes can be wxScrollEvents or wxSpinEvents - FIXME could this be cleaner? // wxEVT_SCROLL_LINEUP, wxEVT_SCROLL_LINEDOWN, wxEVT_SCROLL_THUMBTRACK if ((*m_wxlBindEvent->wxluatype == *p_wxluatype_wxScrollEvent) && ! event->GetClassInfo()->IsKindOf(wxSpinEvent_ClassInfo)) { ! if (*p_wxluatype_wxSpinEvent != WXLUA_TUNKNOWN) event_wxl_type = *p_wxluatype_wxSpinEvent; else event_wxl_type = *p_wxluatype_wxEvent; // get the generic wxluatype_wxEvent } + else if ((*m_wxlBindEvent->wxluatype == *p_wxluatype_wxSpinEvent) && + event->GetClassInfo()->IsKindOf(wxScrollEvent_ClassInfo)) + { + if (*p_wxluatype_wxScrollEvent != WXLUA_TUNKNOWN) + event_wxl_type = *p_wxluatype_wxScrollEvent; + else + event_wxl_type = *p_wxluatype_wxEvent; // get the generic wxluatype_wxEvent + } } *************** *** 215,219 **** void wxLuaWinDestroyCallback::ClearwxLuaState() { ! m_wxlState.UnRef(); } --- 227,231 ---- void wxLuaWinDestroyCallback::ClearwxLuaState() { ! m_wxlState.UnRef(); // ok if it's not Ok() } *************** *** 258,262 **** // Clear our own pointer to this window ! m_wxlState.RemoveTrackedWindow(m_window); wxEvtHandler* evtHandler = m_window->GetEventHandler(); --- 270,274 ---- // Clear our own pointer to this window ! wxluaW_removetrackedwindow(L, m_window); wxEvtHandler* evtHandler = m_window->GetEventHandler(); *************** *** 283,287 **** // remove the ref to the routine since we're clearing the wxLuaState // See ~wxLuaEventCallback ! m_wxlState.wxluaR_Unref(wxlCallback->GetLuaFuncRef(), &wxlua_lreg_refs_key); wxlCallback->ClearwxLuaState(); --- 295,299 ---- // remove the ref to the routine since we're clearing the wxLuaState // See ~wxLuaEventCallback ! wxluaR_unref(L, wxlCallback->GetLuaFuncRef(), &wxlua_lreg_refs_key); wxlCallback->ClearwxLuaState(); Index: wxlua_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlua_bind.cpp,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** wxlua_bind.cpp 1 Oct 2009 04:21:02 -0000 1.35 --- wxlua_bind.cpp 21 Dec 2009 04:06:14 -0000 1.36 *************** *** 196,200 **** { "LUA_TUSERDATA", LUA_TUSERDATA }, { "WXLUAMETHOD_CFUNCTION", WXLUAMETHOD_CFUNCTION }, - { "WXLUAMETHOD_CHECKED_OVERLOAD", WXLUAMETHOD_CHECKED_OVERLOAD }, { "WXLUAMETHOD_CONSTRUCTOR", WXLUAMETHOD_CONSTRUCTOR }, { "WXLUAMETHOD_DELETE", WXLUAMETHOD_DELETE }, --- 196,199 ---- *************** *** 301,316 **** int idx = 1; ! wxLuaBindingList::compatibility_iterator node; ! for (node = wxLuaBinding::GetBindingList()->GetFirst(); node; node = node->GetNext(), idx++) { - wxLuaBinding* binding = node->GetData(); - // Push function to access the binding info const void **ptr = (const void **)lua_newuserdata(L, sizeof(void *)); ! *ptr = binding; lua_newtable(L); lua_pushstring(L, "__index"); ! lua_pushlightuserdata(L, binding); // push tag to recognize table call ! lua_pushcclosure(L, wxluabind_wxLuaBinding__index, 1); // push func with tag as upvalue lua_rawset(L, -3); --- 300,316 ---- int idx = 1; ! ! wxLuaBindingArray& wxlbArray = wxLuaBinding::GetBindingArray(); ! size_t n, count = wxlbArray.GetCount(); ! ! for (n = 0; n < count; n++, idx++) { // Push function to access the binding info const void **ptr = (const void **)lua_newuserdata(L, sizeof(void *)); ! *ptr = wxlbArray[n]; lua_newtable(L); lua_pushstring(L, "__index"); ! lua_pushlightuserdata(L, wxlbArray[n]); // push tag to recognize table call ! lua_pushcclosure(L, wxluabind_wxLuaBinding__index, 1); // push func with tag as upvalue lua_rawset(L, -3); *************** *** 1299,1302 **** --- 1299,1303 ---- m_objectArray = wxLuaGetObjectList_wxlua(m_objectCount); m_functionArray = wxLuaGetFunctionList_wxlua(m_functionCount); + InitBinding(); } *************** *** 1317,1327 **** // --------------------------------------------------------------------------- ! bool wxLuaBinding_wxlua_init() { static wxLuaBinding_wxlua m_binding; - if (wxLuaBinding::GetBindingList()->Find(&m_binding)) return false; ! wxLuaBinding::GetBindingList()->Append(&m_binding); ! return true; } --- 1318,1329 ---- // --------------------------------------------------------------------------- ! wxLuaBinding* wxLuaBinding_wxlua_init() { static wxLuaBinding_wxlua m_binding; ! if (wxLuaBinding::GetBindingArray().Index(&m_binding) == wxNOT_FOUND) ! wxLuaBinding::GetBindingArray().Add(&m_binding); ! ! return &m_binding; } |
From: John L. <jr...@us...> - 2009-11-23 05:29:38
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv28770/wxLua/modules/wxlua/src Modified Files: wxlstate.cpp Log Message: Some cleanup for the wxLuaStackDialog Fix showing local variable tables Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.185 retrieving revision 1.186 diff -C2 -d -r1.185 -r1.186 *** wxlstate.cpp 5 Oct 2009 02:51:29 -0000 1.185 --- wxlstate.cpp 23 Nov 2009 05:28:54 -0000 1.186 *************** *** 26,52 **** //#include "wxluadebug/include/wxldebug.h" // for debugging only ! const char* wxlua_lreg_regtable_key = "wxLua LUA_REGISTRYINDEX tables"; ! const char* wxlua_lreg_wxluastate_key = "wxLuaState"; ! const char* wxlua_lreg_wxluastatedata_key = "wxLuaStateData"; ! const char* wxlua_lreg_wxluabindings_key = "wxLuaBindings installed"; ! const char* wxlua_lreg_classes_key = "wxLuaBindClass structs installed"; ! const char* wxlua_lreg_types_key = "wxLua metatable class types"; ! const char* wxlua_lreg_weakobjects_key = "wxLua objects pushed"; ! const char* wxlua_lreg_gcobjects_key = "wxLua gc objects to delete"; ! const char* wxlua_lreg_derivedmethods_key = "wxLua derived class methods"; ! const char* wxlua_lreg_evtcallbacks_key = "wxLuaEventCallbacks"; ! const char* wxlua_lreg_windestroycallbacks_key = "wxLuaWinDestoyCallbacks"; ! const char* wxlua_lreg_topwindows_key = "wxLua top level wxWindows"; ! const char* wxlua_lreg_wxeventtype_key = "wxLua wxEventType"; ! const char* wxlua_lreg_callbaseclassfunc_key = "wxLua CallBaseClassFunc"; ! const char* wxlua_lreg_refs_key = "wxLua Lua object refs"; ! const char* wxlua_lreg_debug_refs_key = "wxLuaDebugData refs"; ! const char* wxlua_metatable_type_key = "wxLua metatable class type"; ! const char* wxlua_metatable_wxluabindclass_key = "wxLua metatable wxLuaBindClass"; --- 26,52 ---- //#include "wxluadebug/include/wxldebug.h" // for debugging only ! const char* wxlua_lreg_regtable_key = "wxlua_lreg_regtable_key : wxLua LUA_REGISTRYINDEX tables"; ! const char* wxlua_lreg_wxluastate_key = "wxlua_lreg_wxluastate_key : wxLuaState"; ! const char* wxlua_lreg_wxluastatedata_key = "wxlua_lreg_wxluastatedata_key : wxLuaStateData"; ! const char* wxlua_lreg_wxluabindings_key = "wxlua_lreg_wxluabindings_key : wxLuaBindings installed"; ! const char* wxlua_lreg_classes_key = "wxlua_lreg_classes_key : wxLuaBindClass structs installed"; ! const char* wxlua_lreg_types_key = "wxlua_lreg_types_key : wxLua metatable class types"; ! const char* wxlua_lreg_weakobjects_key = "wxlua_lreg_weakobjects_key : wxLua objects pushed"; ! const char* wxlua_lreg_gcobjects_key = "wxlua_lreg_gcobjects_key : wxLua gc objects to delete"; ! const char* wxlua_lreg_derivedmethods_key = "wxlua_lreg_derivedmethods_key : wxLua derived class methods"; ! const char* wxlua_lreg_evtcallbacks_key = "wxlua_lreg_evtcallbacks_key : wxLuaEventCallbacks"; ! const char* wxlua_lreg_windestroycallbacks_key = "wxlua_lreg_windestroycallbacks_key : wxLuaWinDestoyCallbacks"; ! const char* wxlua_lreg_topwindows_key = "wxlua_lreg_topwindows_key : wxLua top level wxWindows"; ! const char* wxlua_lreg_wxeventtype_key = "wxlua_lreg_wxeventtype_key : wxLua wxEventType"; ! const char* wxlua_lreg_callbaseclassfunc_key = "wxlua_lreg_callbaseclassfunc_key : wxLua CallBaseClassFunc"; ! const char* wxlua_lreg_refs_key = "wxlua_lreg_refs_key : wxLua Lua object refs"; ! const char* wxlua_lreg_debug_refs_key = "wxlua_lreg_debug_refs_key : wxLuaDebugData refs"; ! const char* wxlua_metatable_type_key = "wxlua_metatable_type_key : wxLua metatable class type"; ! const char* wxlua_metatable_wxluabindclass_key = "wxlua_metatable_wxluabindclass_key : wxLua metatable wxLuaBindClass"; |
From: John L. <jr...@us...> - 2009-11-23 05:29:14
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv28770/wxLua/modules/wxluadebug/src Modified Files: wxldebug.cpp wxlstack.cpp Log Message: Some cleanup for the wxLuaStackDialog Fix showing local variable tables Index: wxlstack.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxlstack.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** wxlstack.cpp 21 Nov 2009 20:24:02 -0000 1.34 --- wxlstack.cpp 23 Nov 2009 05:29:01 -0000 1.35 *************** *** 68,76 **** virtual wxListItemAttr *OnGetItemAttr(long item) const; - wxListItemAttr m_itemAttr; wxLuaStackDialog* m_stkDlg; }; - wxString wxLuaStackListCtrl::OnGetItemText(long item, long column) const { --- 68,74 ---- *************** *** 83,145 **** int wxLuaStackListCtrl::OnGetItemColumnImage(long item, long column) const { ! if ((column == wxLuaStackDialog::LIST_COL_KEY) || ! (column == wxLuaStackDialog::LIST_COL_KEY_TYPE) || ! (column == wxLuaStackDialog::LIST_COL_VALUE_TYPE)) ! { ! wxLuaStackListData* stkListData = (wxLuaStackListData*)m_stkDlg->m_listData[item]; ! wxCHECK_MSG(stkListData, -1, wxT("Invalid wxLuaStackListData item")); ! wxLuaDebugItem* debugItem = stkListData->GetDebugItem(); ! wxCHECK_MSG(debugItem, -1, wxT("Invalid wxLuaDebugItem item")); ! ! switch (column) ! { ! case wxLuaStackDialog::LIST_COL_KEY : ! { ! return m_stkDlg->GetItemImage(debugItem); ! } ! case wxLuaStackDialog::LIST_COL_KEY_TYPE : ! { ! if (debugItem->GetFlagBit(WXLUA_DEBUGITEM_KEY_REF)) ! { ! if (debugItem->GetFlagBit(WXLUA_DEBUGITEM_EXPANDED)) ! return wxLuaStackDialog::IMG_TABLE_OPEN; ! else ! return wxLuaStackDialog::IMG_TABLE; ! } ! break; ! } ! case wxLuaStackDialog::LIST_COL_VALUE_TYPE : ! { ! if (debugItem->GetFlagBit(WXLUA_DEBUGITEM_VALUE_REF)) ! { ! if (debugItem->GetFlagBit(WXLUA_DEBUGITEM_EXPANDED)) ! return wxLuaStackDialog::IMG_TABLE_OPEN; ! else ! return wxLuaStackDialog::IMG_TABLE; ! } ! break; ! } ! } ! } ! ! return -1; } wxListItemAttr *wxLuaStackListCtrl::OnGetItemAttr(long item) const { ! wxLuaStackListData* stkListData = (wxLuaStackListData*)m_stkDlg->m_listData[item]; ! wxCHECK_MSG(stkListData, NULL, wxT("Invalid wxLuaStackListData item")); ! wxLuaDebugItem* debugItem = stkListData->GetDebugItem(); ! wxCHECK_MSG(debugItem, NULL, wxT("Invalid wxLuaDebugItem item")); ! ! int img = m_stkDlg->GetItemImage(debugItem); ! ! wxLuaStackListCtrl* stkCtrl = (wxLuaStackListCtrl*)this; // unconst ! ! stkCtrl->m_itemAttr.SetTextColour(m_stkDlg->m_typeColours[img]); ! ! //unsigned char c = 255 - (stkListData->m_level % 5)*22; ! //stkCtrl->m_itemAttr.SetBackgroundColour(wxColour(c,c,c)); ! ! return &stkCtrl->m_itemAttr; } --- 81,89 ---- int wxLuaStackListCtrl::OnGetItemColumnImage(long item, long column) const { ! return m_stkDlg->GetItemColumnImage(item, column); } wxListItemAttr *wxLuaStackListCtrl::OnGetItemAttr(long item) const { ! return m_stkDlg->GetItemAttr(item); } *************** *** 439,443 **** } ! int wxLuaStackDialog::GetItemImage(const wxLuaDebugItem *dbgItem) { wxCHECK_MSG(dbgItem, IMG_UNKNOWN, wxT("Invalid wxLuaDebugItem")); --- 383,387 ---- } ! int wxLuaStackDialog::GetItemImage(const wxLuaDebugItem *dbgItem) const { wxCHECK_MSG(dbgItem, IMG_UNKNOWN, wxT("Invalid wxLuaDebugItem")); *************** *** 519,522 **** --- 463,541 ---- } + int wxLuaStackDialog::GetItemColumnImage(long item, long column) const + { + if ((column == LIST_COL_KEY) || + (column == LIST_COL_KEY_TYPE) || + (column == LIST_COL_VALUE_TYPE)) + { + wxLuaStackListData* stkListData = (wxLuaStackListData*)m_listData[item]; + wxCHECK_MSG(stkListData, -1, wxT("Invalid wxLuaStackListData item")); + wxLuaDebugItem* debugItem = stkListData->GetDebugItem(); + wxCHECK_MSG(debugItem, -1, wxT("Invalid wxLuaDebugItem item")); + + switch (column) + { + case LIST_COL_KEY : + { + return GetItemImage(debugItem); + } + case LIST_COL_KEY_TYPE : + { + if (debugItem->GetFlagBit(WXLUA_DEBUGITEM_KEY_REF)) + { + if (debugItem->GetFlagBit(WXLUA_DEBUGITEM_EXPANDED)) + return IMG_TABLE_OPEN; + else + return IMG_TABLE; + } + break; + } + case LIST_COL_VALUE_TYPE : + { + if (debugItem->GetFlagBit(WXLUA_DEBUGITEM_VALUE_REF)) + { + if (debugItem->GetFlagBit(WXLUA_DEBUGITEM_EXPANDED)) + return IMG_TABLE_OPEN; + else + return IMG_TABLE; + } + break; + } + } + } + + return -1; + } + + wxListItemAttr *wxLuaStackDialog::GetItemAttr(long item) const + { + wxLuaStackListData* stkListData = (wxLuaStackListData*)m_listData[item]; + wxCHECK_MSG(stkListData, NULL, wxT("Invalid wxLuaStackListData item")); + wxLuaDebugItem* debugItem = stkListData->GetDebugItem(); + wxCHECK_MSG(debugItem, NULL, wxT("Invalid wxLuaDebugItem item")); + + int img = GetItemImage(debugItem); + + wxLuaStackDialog* stkDlg = (wxLuaStackDialog*)this; // unconst this + + stkDlg->m_itemAttr.SetTextColour(m_typeColours[img]); + + //unsigned char c = 255 - (stkListData->m_level % 5)*22; + //stkDlg->m_itemAttr.SetBackgroundColour(wxColour(c,c,c)); + + return &stkDlg->m_itemAttr; + } + + void wxLuaStackDialog::SelectStack(int stack_sel) + { + wxCHECK_RET((stack_sel >= 0) && (stack_sel < (int)m_stackEntries.GetCount()), wxT("Invalid stack index")); + + RemoveAllLuaReferences(); // remove them now since we're starting from scratch + + m_stack_sel = stack_sel; + int n_entry = m_stackEntries[m_stack_sel]; + EnumerateStackEntry(n_entry); + } + void wxLuaStackDialog::EnumerateStack() { *************** *** 572,576 **** wxCHECK_RET(debugData.Ok(), wxT("Invalid wxLuaDebugData in FillStackEntry")); - RemoveAllLuaReferences(); DeleteAllListItemData(); m_expandedItems.clear(); --- 591,594 ---- *************** *** 593,597 **** // If at global scope, process globals ! if (m_stack_sel == (int)m_stackEntries.GetCount() - 1) { // When used with the wxLuaDebuggerServer we get delayed responses --- 611,615 ---- // If at global scope, process globals ! //if (m_stack_sel == (int)m_stackEntries.GetCount() - 1) { // When used with the wxLuaDebuggerServer we get delayed responses *************** *** 675,680 **** wxTreeItemIdValue dummyCookie; wxTreeItemId dummyId = m_treeCtrl->GetFirstChild(treeId, dummyCookie); ! if (m_treeCtrl->GetItemText(dummyId) == DUMMY_TREEITEM) m_treeCtrl->Delete(dummyId); } } --- 693,701 ---- wxTreeItemIdValue dummyCookie; wxTreeItemId dummyId = m_treeCtrl->GetFirstChild(treeId, dummyCookie); ! if ((m_treeCtrl->GetItemText(dummyId) == DUMMY_TREEITEM) && ! (m_treeCtrl->GetItemData(dummyId) == NULL)) ! { m_treeCtrl->Delete(dummyId); + } } } *************** *** 919,930 **** } - void wxLuaStackDialog::SelectStack(int stack_sel) - { - wxCHECK_RET((stack_sel >= 0) && (stack_sel < (int)m_stackEntries.GetCount()), wxT("Invalid stack index")); - m_stack_sel = stack_sel; - int n_entry = m_stackEntries[m_stack_sel]; - EnumerateStackEntry(n_entry); - } - void wxLuaStackDialog::OnTreeItem(wxTreeEvent &event) { --- 940,943 ---- *************** *** 1038,1050 **** FillTableEntry(lc_item, stkListData->m_childrenDebugData); ! return true; // expanded = true } ! ! // Check and block linked tables already shown, select it and return ! if (debugItem->GetRef() != LUA_NOREF) { long long_key = 0; wxCHECK_MSG(debugItem->GetRefPtr(long_key), false, wxT("Invalid table item")); if (m_expandedItems[long_key]) // linked tables { --- 1051,1062 ---- FillTableEntry(lc_item, stkListData->m_childrenDebugData); ! expanded = true; } ! else if (debugItem->GetRef() != LUA_NOREF) { long long_key = 0; wxCHECK_MSG(debugItem->GetRefPtr(long_key), false, wxT("Invalid table item")); + // Check and block linked tables already shown, select it and return if (m_expandedItems[long_key]) // linked tables { *************** *** 1064,1068 **** } } ! else { debugItem->SetFlagBit(WXLUA_DEBUGITEM_EXPANDED, true); --- 1076,1080 ---- } } ! else // new item to enumerate and expand { debugItem->SetFlagBit(WXLUA_DEBUGITEM_EXPANDED, true); Index: wxldebug.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxldebug.cpp,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** wxldebug.cpp 21 Nov 2009 20:24:02 -0000 1.72 --- wxldebug.cpp 23 Nov 2009 05:29:00 -0000 1.73 *************** *** 232,252 **** wxString source(lua2wx(luaDebug.source)); ! GetTypeValue(L, -1, &wxl_valuetype, value); ! ! // FIXME! local tables get the right values for GetTypeValue(...) ! // but when you run wxluaR_ref() to store them they disappear ! // so that the next time wxluaR_ref() is run it reuses the same ! // index as your local table. ! // When using the stack dialog the next wxluaR_ref() is the ! // global table which is very confusing. ! int flag_type = 0; ! int nRef = LUA_NOREF; //RefTable(L, -1, &flag_type, references); ! lua_pop(L, 1); // remove variable value ! Add(new wxLuaDebugItem(name, WXLUA_TNONE, value, wxl_valuetype, source, nRef, 0, flag_type)); ++count; name = lua2wx(lua_getlocal(L, &luaDebug, ++stack_idx)); } --- 232,258 ---- wxString source(lua2wx(luaDebug.source)); ! int lua_value_type = GetTypeValue(L, -1, &wxl_valuetype, value); ! int val_flag_type = 0; ! int val_ref = LUA_NOREF; ! if (lua_value_type == LUA_TTABLE) ! { ! val_ref = RefTable(L, -1, &val_flag_type, WXLUA_DEBUGITEM_VALUE_REF, references); ! } ! else if (lua_value_type == LUA_TUSERDATA) ! { ! if (lua_getmetatable(L, -1)) // doesn't push anything if nil ! { ! val_ref = RefTable(L, -1, &val_flag_type, WXLUA_DEBUGITEM_VALUE_REF, references); ! lua_pop(L, 1); ! } ! } ! Add(new wxLuaDebugItem(name, WXLUA_TNONE, value, wxl_valuetype, source, val_ref, 0, val_flag_type)); ++count; + lua_pop(L, 1); // remove variable value + name = lua2wx(lua_getlocal(L, &luaDebug, ++stack_idx)); } *************** *** 337,344 **** lua_pushvalue(L, -2); // push value (table we're iterating) lua_rawget(L, -2); ! lightuserdata_reg_key = lua_touserdata(L, -1); lua_pop(L, 2); // pop wxlua_lreg_regtable_key table and (nil or lightuserdata) ! // Check if the table/userdata has a metatable if (lua_getmetatable(L, -1)) // if no metatable then nothing is pushed { --- 343,350 ---- lua_pushvalue(L, -2); // push value (table we're iterating) lua_rawget(L, -2); ! lightuserdata_reg_key = lua_touserdata(L, -1); // returns NULL for nil lua_pop(L, 2); // pop wxlua_lreg_regtable_key table and (nil or lightuserdata) ! // Check if this table/userdata has a metatable if (lua_getmetatable(L, -1)) // if no metatable then nothing is pushed { *************** *** 369,373 **** int lua_value_type = GetTypeValue(L, -1, &wxl_valuetype, value); ! // Handle wxLua LUA_REGISTRYINDEX tables to give more information if (lightuserdata_reg_key != NULL) { --- 375,379 ---- int lua_value_type = GetTypeValue(L, -1, &wxl_valuetype, value); ! // Handle items within the wxLua LUA_REGISTRYINDEX tables to give more information if (lightuserdata_reg_key != NULL) { *************** *** 410,414 **** wxWindow* win = (wxWindow*)lua_touserdata(L, -2); name += wxT(" ") + wxString(win->GetClassInfo()->GetClassName()); ! } else if (lightuserdata_reg_key == &wxlua_lreg_gcobjects_key) { --- 416,420 ---- wxWindow* win = (wxWindow*)lua_touserdata(L, -2); name += wxT(" ") + wxString(win->GetClassInfo()->GetClassName()); ! } else if (lightuserdata_reg_key == &wxlua_lreg_gcobjects_key) { *************** *** 440,444 **** void* key = lua_touserdata(L, -2); ! if (key == &wxlua_metatable_type_key) { value += wxString::Format(wxT(" (%s)"), wxluaT_typename(L, (int)lua_tonumber(L, -1)).c_str()); --- 446,460 ---- void* key = lua_touserdata(L, -2); ! if (key == &wxlua_lreg_wxeventtype_key) ! { ! wxEventType eventType = (wxEventType)lua_tonumber(L, -1); ! const wxLuaBindEvent* wxlEvent = wxLuaBinding::FindBindEvent(eventType); ! ! if (wxlEvent != NULL) ! { ! value = wxString::Format(wxT("%d = %s : %s"), eventType, lua2wx(wxlEvent->name).c_str(), wxluaT_typename(L, *wxlEvent->wxluatype).c_str()); ! } ! } ! else if (key == &wxlua_metatable_type_key) { value += wxString::Format(wxT(" (%s)"), wxluaT_typename(L, (int)lua_tonumber(L, -1)).c_str()); *************** *** 502,505 **** --- 518,522 ---- } + // Add the value, but not if the value doesn't expand and the key was already added if ((key_flag_type == 0) || ((key_flag_type != 0) && (val_flag_type != 0))) { *************** *** 524,534 **** int lua_ref = LUA_NOREF; ! //if (lua_istable(L, stack_idx)) { ! //nRef = wxluaR_isrefed(L, stack_idx, &wxlua_lreg_debug_refs_key); // don't duplicate refs if (lua_ref == LUA_NOREF) { - if (flag_type) *flag_type |= (WXLUA_DEBUGITEM_IS_REFED | extra_flag); lua_ref = wxluaR_ref(L, stack_idx, &wxlua_lreg_debug_refs_key); references.Add(lua_ref); --- 541,553 ---- int lua_ref = LUA_NOREF; ! ! if (lua_istable(L, stack_idx)) { ! if (flag_type) *flag_type |= (WXLUA_DEBUGITEM_IS_REFED | extra_flag); ! ! lua_ref = wxluaR_isrefed(L, stack_idx, &wxlua_lreg_debug_refs_key); // don't duplicate refs if (lua_ref == LUA_NOREF) { lua_ref = wxluaR_ref(L, stack_idx, &wxlua_lreg_debug_refs_key); references.Add(lua_ref); |
From: John L. <jr...@us...> - 2009-11-23 05:29:09
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/include In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv28770/wxLua/modules/wxluadebug/include Modified Files: wxlstack.h Log Message: Some cleanup for the wxLuaStackDialog Fix showing local variable tables Index: wxlstack.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/wxlstack.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** wxlstack.h 21 Nov 2009 20:24:02 -0000 1.20 --- wxlstack.h 23 Nov 2009 05:28:59 -0000 1.21 *************** *** 157,167 **** }; - // Draw the string centered in the bitmap virtual wxBitmap CreateBmpString(const wxBitmap& bmp, const wxString& s); // Get the IMG_XXX enum to use for this dataitem ! virtual int GetItemImage(const wxLuaDebugItem *dbgItem); // Get the string to show in the wxListCtrl virtual wxString GetItemText(long item, long column, bool exact_value = false); // Override these functions if you need to provide an alternate way to get --- 157,173 ---- }; // Draw the string centered in the bitmap virtual wxBitmap CreateBmpString(const wxBitmap& bmp, const wxString& s); // Get the IMG_XXX enum to use for this dataitem ! virtual int GetItemImage(const wxLuaDebugItem *dbgItem) const; // Get the string to show in the wxListCtrl virtual wxString GetItemText(long item, long column, bool exact_value = false); + // Get the image to show for the column in the wxListCtrl + virtual int GetItemColumnImage(long item, long column) const; + // Get the attribute to use for the wxListCtrl + virtual wxListItemAttr* GetItemAttr(long item) const; + + // Select one of the stack levels after calling EnumerateStack() + void SelectStack(int stack_sel); // Override these functions if you need to provide an alternate way to get *************** *** 194,198 **** // Handle and set the stack from the stack combo selection void OnSelectStack(wxCommandEvent &event); - void SelectStack(int stack_sel); // Handle all wxTreeCtrl events void OnTreeItem(wxTreeEvent &event); --- 200,203 ---- *************** *** 235,238 **** --- 240,245 ---- int m_img_font_size; + wxListItemAttr m_itemAttr; // reusable attr for the wxListCtrl + bool m_show_dup_expand_msg; int m_batch_count; |
From: John L. <jr...@us...> - 2009-11-21 20:24:36
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv28276/wxLua/modules/wxluadebug/src Modified Files: wxldebug.cpp wxlstack.cpp Log Message: Fix bug in showing folder symbol for key in wxLuaStackDialog Fix bug in not removing expanded table ref for empty tables in wxLuaStackDialog Remember if the dialog was maximized the last time it was shown Index: wxlstack.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxlstack.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** wxlstack.cpp 17 Nov 2009 06:11:04 -0000 1.33 --- wxlstack.cpp 21 Nov 2009 20:24:02 -0000 1.34 *************** *** 107,110 **** --- 107,111 ---- return wxLuaStackDialog::IMG_TABLE; } + break; } case wxLuaStackDialog::LIST_COL_VALUE_TYPE : *************** *** 117,120 **** --- 118,122 ---- return wxLuaStackDialog::IMG_TABLE; } + break; } } *************** *** 147,151 **** IMPLEMENT_ABSTRACT_CLASS(wxLuaStackDialog, wxDialog) ! wxSize wxLuaStackDialog::m_defaultSize(500, 300); BEGIN_EVENT_TABLE(wxLuaStackDialog, wxDialog) --- 149,154 ---- IMPLEMENT_ABSTRACT_CLASS(wxLuaStackDialog, wxDialog) ! wxSize wxLuaStackDialog::sm_defaultSize(500, 300); ! bool wxLuaStackDialog::sm_maximized = false; BEGIN_EVENT_TABLE(wxLuaStackDialog, wxDialog) *************** *** 196,200 **** wxSize size(size_); ! if (size == wxDefaultSize) size = m_defaultSize; if (!wxDialog::Create(parent, id, title, pos, size, --- 199,203 ---- wxSize size(size_); ! if (size == wxDefaultSize) size = sm_defaultSize; if (!wxDialog::Create(parent, id, title, pos, size, *************** *** 379,382 **** --- 382,388 ---- SetSize(size); // force last good/known size + if (sm_maximized) + Maximize(); + EnumerateStack(); *************** *** 388,392 **** { if (!IsFullScreen() && !IsIconized() && !IsMaximized()) ! m_defaultSize = GetSize(); RemoveAllLuaReferences(); --- 394,400 ---- { if (!IsFullScreen() && !IsIconized() && !IsMaximized()) ! sm_defaultSize = GetSize(); ! ! sm_maximized = IsMaximized(); RemoveAllLuaReferences(); *************** *** 1043,1055 **** if (m_show_dup_expand_msg) // don't bother when expanding all children { ! wxMessageBox(wxT("Cannot expand linked tables,\nplease see the already expanded table."), ! wxT("wxLua Stack"), wxOK | wxCENTRE, this); ! ! int n = m_listData.Index((void*)m_expandedItems[long_key]); ! wxCHECK_MSG(n != wxNOT_FOUND, false, wxT("Unable to find hash of expanded items.")); ! m_listCtrl->SetItemState(n, wxLIST_STATE_FOCUSED, wxLIST_STATE_FOCUSED); ! m_listCtrl->SetItemState(n, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); ! m_listCtrl->EnsureVisible(n); } } --- 1051,1065 ---- if (m_show_dup_expand_msg) // don't bother when expanding all children { ! int ret = wxMessageBox(wxString::Format(wxT("Cannot expand linked tables %lx,\nselect Ok to see the previously expanded table."), long_key), ! wxT("wxLua Stack"), wxOK | wxCANCEL | wxCENTRE, this); ! if (ret == wxOK) ! { ! int n = m_listData.Index((void*)m_expandedItems[long_key]); ! wxCHECK_MSG(n != wxNOT_FOUND, false, wxT("Unable to find hash of expanded items.")); ! m_listCtrl->SetItemState(n, wxLIST_STATE_FOCUSED, wxLIST_STATE_FOCUSED); ! m_listCtrl->SetItemState(n, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); ! m_listCtrl->EnsureVisible(n); ! } } } *************** *** 1147,1151 **** { wxLuaStackListData* stkListData_n = (wxLuaStackListData*)m_listData[n]; ! wxCHECK_MSG(stkListData_n != NULL, false, wxT("Invalid wxLuaStack data")); // are we finished with the original expanded item --- 1157,1163 ---- { wxLuaStackListData* stkListData_n = (wxLuaStackListData*)m_listData[n]; ! wxCHECK_MSG(stkListData_n != NULL, false, wxT("Invalid wxLuaStack data n")); ! wxLuaDebugItem* debugItem_n = stkListData_n->GetDebugItem(); ! wxCHECK_MSG((debugItem_n != NULL), false, wxT("Invalid debug item n")); // are we finished with the original expanded item *************** *** 1156,1169 **** // remove all expanded children items ! if (stkListData_n->m_childrenDebugData.Ok() && ! stkListData_n->GetDebugItem()->GetFlagBit(WXLUA_DEBUGITEM_EXPANDED)) { long long_key = 0; ! if (stkListData_n->GetDebugItem()->GetRefPtr(long_key)) m_expandedItems.erase(long_key); } // note that the debug item is a member of the parent debug data array ! stkListData_n->GetDebugItem()->SetFlagBit(WXLUA_DEBUGITEM_EXPANDED, false); //m_listData.RemoveAt(n); // we remove them all at once for speed, see below --- 1168,1180 ---- // remove all expanded children items ! if (debugItem_n->GetFlagBit(WXLUA_DEBUGITEM_EXPANDED)) { long long_key = 0; ! if (debugItem_n->GetRefPtr(long_key)) m_expandedItems.erase(long_key); } // note that the debug item is a member of the parent debug data array ! debugItem_n->SetFlagBit(WXLUA_DEBUGITEM_EXPANDED, false); //m_listData.RemoveAt(n); // we remove them all at once for speed, see below *************** *** 1280,1286 **** lua_pop(L, 1); // pop ref table } // Clear out the old numeric references since it should be "empty" // though full of dead table[idx]=next_idx, where table[0] = 1; - wxlua_lreg_createtable(L, &wxlua_lreg_debug_refs_key); } --- 1291,1299 ---- lua_pop(L, 1); // pop ref table } + // Clear out the old numeric references since it should be "empty" // though full of dead table[idx]=next_idx, where table[0] = 1; wxlua_lreg_createtable(L, &wxlua_lreg_debug_refs_key); + + lua_gc(L, LUA_GCCOLLECT, 0); // full garbage collection to cleanup after ourselves } Index: wxldebug.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxldebug.cpp,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** wxldebug.cpp 17 Nov 2009 06:11:03 -0000 1.71 --- wxldebug.cpp 21 Nov 2009 20:24:02 -0000 1.72 *************** *** 463,467 **** --- 463,469 ---- // don't ref anything in this table since it's already refed if ((lua_key_type == LUA_TTABLE) && (lightuserdata_reg_key != &wxlua_lreg_debug_refs_key)) + { key_ref = RefTable(L, -2, &key_flag_type, WXLUA_DEBUGITEM_KEY_REF, references); + } else if (lua_key_type == LUA_TUSERDATA) { *************** *** 488,492 **** --- 490,496 ---- // don't ref anything in this table since it's already refed if ((lua_value_type == LUA_TTABLE) && (lightuserdata_reg_key != &wxlua_lreg_debug_refs_key)) + { val_ref = RefTable(L, -1, &val_flag_type, WXLUA_DEBUGITEM_VALUE_REF, references); + } else if (lua_value_type == LUA_TUSERDATA) { |
From: John L. <jr...@us...> - 2009-11-21 20:24:14
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/include In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv28276/wxLua/modules/wxluadebug/include Modified Files: wxlstack.h Log Message: Fix bug in showing folder symbol for key in wxLuaStackDialog Fix bug in not removing expanded table ref for empty tables in wxLuaStackDialog Remember if the dialog was maximized the last time it was shown Index: wxlstack.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/wxlstack.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** wxlstack.h 5 Oct 2009 02:51:29 -0000 1.19 --- wxlstack.h 21 Nov 2009 20:24:02 -0000 1.20 *************** *** 242,246 **** wxArrayPtrVoid m_listData; // array of wxLuaStackListData ! static wxSize m_defaultSize; // remember last dialog size private: --- 242,247 ---- wxArrayPtrVoid m_listData; // array of wxLuaStackListData ! static wxSize sm_defaultSize; // remember last dialog size ! static bool sm_maximized; // remember if maximized private: |
From: John L. <jr...@us...> - 2009-11-17 06:11:17
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv2334/wxLua/modules/wxluasocket/src Modified Files: wxldserv.cpp Log Message: Make collapsing in the wxLuaStackDialog MUCH faster by not recursively calling Collapse(). Tabs to spaces in wxluacan. Index: wxldserv.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxldserv.cpp,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** wxldserv.cpp 5 Oct 2009 02:51:29 -0000 1.51 --- wxldserv.cpp 17 Nov 2009 06:11:04 -0000 1.52 *************** *** 46,50 **** wxLuaDebuggerEvent::wxLuaDebuggerEvent(const wxLuaDebuggerEvent& event) ! :wxEvent(event), m_line_number(event.m_line_number), m_fileName(event.m_fileName), --- 46,50 ---- wxLuaDebuggerEvent::wxLuaDebuggerEvent(const wxLuaDebuggerEvent& event) ! :wxEvent(event), m_line_number(event.m_line_number), m_fileName(event.m_fileName), |
From: John L. <jr...@us...> - 2009-11-17 06:11:13
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv2334/wxLua/modules/wxluadebug/src Modified Files: wxldebug.cpp wxlstack.cpp Log Message: Make collapsing in the wxLuaStackDialog MUCH faster by not recursively calling Collapse(). Tabs to spaces in wxluacan. Index: wxlstack.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxlstack.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** wxlstack.cpp 15 Nov 2009 17:56:04 -0000 1.32 --- wxlstack.cpp 17 Nov 2009 06:11:04 -0000 1.33 *************** *** 92,115 **** wxCHECK_MSG(debugItem, -1, wxT("Invalid wxLuaDebugItem item")); ! if (column == wxLuaStackDialog::LIST_COL_KEY) ! return m_stkDlg->GetItemImage(debugItem); ! else if (column == wxLuaStackDialog::LIST_COL_KEY_TYPE) { ! if (debugItem->GetFlagBit(WXLUA_DEBUGITEM_KEY_REF)) { ! if (debugItem->GetFlagBit(WXLUA_DEBUGITEM_EXPANDED)) ! return wxLuaStackDialog::IMG_TABLE_OPEN; ! else ! return wxLuaStackDialog::IMG_TABLE; } ! } ! else if (column == wxLuaStackDialog::LIST_COL_VALUE_TYPE) ! { ! if (debugItem->GetFlagBit(WXLUA_DEBUGITEM_VALUE_REF)) { ! if (debugItem->GetFlagBit(WXLUA_DEBUGITEM_EXPANDED)) ! return wxLuaStackDialog::IMG_TABLE_OPEN; ! else ! return wxLuaStackDialog::IMG_TABLE; } } --- 92,120 ---- wxCHECK_MSG(debugItem, -1, wxT("Invalid wxLuaDebugItem item")); ! switch (column) { ! case wxLuaStackDialog::LIST_COL_KEY : { ! return m_stkDlg->GetItemImage(debugItem); } ! case wxLuaStackDialog::LIST_COL_KEY_TYPE : { ! if (debugItem->GetFlagBit(WXLUA_DEBUGITEM_KEY_REF)) ! { ! if (debugItem->GetFlagBit(WXLUA_DEBUGITEM_EXPANDED)) ! return wxLuaStackDialog::IMG_TABLE_OPEN; ! else ! return wxLuaStackDialog::IMG_TABLE; ! } ! } ! case wxLuaStackDialog::LIST_COL_VALUE_TYPE : ! { ! if (debugItem->GetFlagBit(WXLUA_DEBUGITEM_VALUE_REF)) ! { ! if (debugItem->GetFlagBit(WXLUA_DEBUGITEM_EXPANDED)) ! return wxLuaStackDialog::IMG_TABLE_OPEN; ! else ! return wxLuaStackDialog::IMG_TABLE; ! } } } *************** *** 545,549 **** wxString name(item->GetKey()); if (n == count - 1) name += wxT(" (Globals)"); ! m_stackChoice->Append(name); } --- 550,554 ---- wxString name(item->GetKey()); if (n == count - 1) name += wxT(" (Globals)"); ! m_stackChoice->Append(name); } *************** *** 950,953 **** --- 955,960 ---- void wxLuaStackDialog::OnListItem(wxListEvent &event) { + if (m_batch_count > 0) return; + long list_item = event.GetIndex(); *************** *** 1010,1015 **** wxCHECK_MSG(debugItem != NULL, false, wxT("Invalid debug item")); - int nRef = debugItem->GetRef(); - if (!debugItem->GetFlagBit(WXLUA_DEBUGITEM_EXPANDED)) { --- 1017,1020 ---- *************** *** 1024,1029 **** FillTableEntry(lc_item, stkListData->m_childrenDebugData); ! expanded = true; ! return true; } --- 1029,1034 ---- FillTableEntry(lc_item, stkListData->m_childrenDebugData); ! ! return true; // expanded = true } *************** *** 1034,1040 **** wxCHECK_MSG(debugItem->GetRefPtr(long_key), false, wxT("Invalid table item")); ! if (m_expandedItems[long_key]) { ! if (m_show_dup_expand_msg) { wxMessageBox(wxT("Cannot expand linked tables,\nplease see the already expanded table."), --- 1039,1045 ---- wxCHECK_MSG(debugItem->GetRefPtr(long_key), false, wxT("Invalid table item")); ! if (m_expandedItems[long_key]) // linked tables { ! if (m_show_dup_expand_msg) // don't bother when expanding all children { wxMessageBox(wxT("Cannot expand linked tables,\nplease see the already expanded table."), *************** *** 1048,1067 **** m_listCtrl->EnsureVisible(n); } - - return false; } ! } ! ! if (nRef != LUA_NOREF) ! { ! debugItem->SetFlagBit(WXLUA_DEBUGITEM_EXPANDED, true); ! long long_key = 0; ! wxCHECK_MSG(debugItem->GetRefPtr(long_key), false, wxT("Invalid table item")); ! m_expandedItems[long_key] = (long)stkListData; ! int nIndex = debugItem->GetIndex() + 1; ! EnumerateTable(nRef, nIndex, lc_item); ! expanded = true; } } --- 1053,1066 ---- m_listCtrl->EnsureVisible(n); } } ! else ! { ! debugItem->SetFlagBit(WXLUA_DEBUGITEM_EXPANDED, true); ! m_expandedItems[long_key] = (long)stkListData; ! EnumerateTable(debugItem->GetRef(), debugItem->GetIndex() + 1, lc_item); ! expanded = true; ! } } } *************** *** 1098,1102 **** wxLuaStackListData* stkListData_n = (wxLuaStackListData*)m_listData[n]; ! if ((n > lc_item) && (stkListData_n->m_level <= level)) break; if (counter % 50 == 0) --- 1097,1102 ---- wxLuaStackListData* stkListData_n = (wxLuaStackListData*)m_listData[n]; ! if ((n > lc_item) && (stkListData_n->m_level <= level)) ! break; if (counter % 50 == 0) *************** *** 1136,1144 **** if (debugItem->GetFlagBit(WXLUA_DEBUGITEM_EXPANDED)) { ! BeginBatch(); ! wxLuaDebugData childData = stkListData->m_childrenDebugData; if (childData.Ok()) { long n, count = m_listCtrl->GetItemCount(); --- 1136,1145 ---- if (debugItem->GetFlagBit(WXLUA_DEBUGITEM_EXPANDED)) { ! BeginBatch(); ! wxLuaDebugData childData = stkListData->m_childrenDebugData; if (childData.Ok()) { + int level = stkListData->m_level; long n, count = m_listCtrl->GetItemCount(); *************** *** 1148,1180 **** wxCHECK_MSG(stkListData_n != NULL, false, wxT("Invalid wxLuaStack data")); ! if (stkListData_n->m_parentDebugData == childData) ! { ! if (stkListData_n->m_childrenDebugData.Ok() && ! stkListData_n->GetDebugItem()->GetFlagBit(WXLUA_DEBUGITEM_EXPANDED)) ! { ! long long_key = 0; ! if (stkListData_n->GetDebugItem()->GetRefPtr(long_key)) ! m_expandedItems.erase(long_key); ! CollapseItem(n); ! n--; count = m_listData.GetCount(); ! continue; ! } ! collapsed = true; // only if we removed anything ! if (stkListData_n->m_treeId) ! m_treeCtrl->Delete(stkListData_n->m_treeId); ! m_listData.RemoveAt(n); ! if (stkListData_n != NULL) ! delete stkListData_n; ! n--; count = m_listData.GetCount(); ! } ! } ! } // don't call collapse here, let MSW do it if this is called from OnTreeItem --- 1149,1186 ---- wxCHECK_MSG(stkListData_n != NULL, false, wxT("Invalid wxLuaStack data")); ! // are we finished with the original expanded item ! if (stkListData_n->m_level <= level) ! break; ! collapsed = true; // only if we removed anything ! // remove all expanded children items ! if (stkListData_n->m_childrenDebugData.Ok() && ! stkListData_n->GetDebugItem()->GetFlagBit(WXLUA_DEBUGITEM_EXPANDED)) ! { ! long long_key = 0; ! if (stkListData_n->GetDebugItem()->GetRefPtr(long_key)) ! m_expandedItems.erase(long_key); ! } ! ! // note that the debug item is a member of the parent debug data array ! stkListData_n->GetDebugItem()->SetFlagBit(WXLUA_DEBUGITEM_EXPANDED, false); ! //m_listData.RemoveAt(n); // we remove them all at once for speed, see below ! //n--; ! //count = m_listData.GetCount(); ! delete stkListData_n; ! } ! m_listData.RemoveAt(lc_item+1, n-lc_item-1); ! } ! long long_key = 0; ! if (debugItem->GetRefPtr(long_key)) ! m_expandedItems.erase(long_key); ! debugItem->SetFlagBit(WXLUA_DEBUGITEM_EXPANDED, false); ! m_listCtrl->SetItemCount(m_listData.GetCount()); // don't call collapse here, let MSW do it if this is called from OnTreeItem *************** *** 1184,1196 **** m_treeCtrl->AppendItem(stkListData->m_treeId, DUMMY_TREEITEM); - debugItem->SetFlagBit(WXLUA_DEBUGITEM_EXPANDED, false); - - long long_key = 0; - if (debugItem->GetRefPtr(long_key)) - m_expandedItems.erase(long_key); - - m_listCtrl->SetItemCount(m_listData.GetCount()); EndBatch(); ! } return collapsed; --- 1190,1195 ---- m_treeCtrl->AppendItem(stkListData->m_treeId, DUMMY_TREEITEM); EndBatch(); ! } return collapsed; *************** *** 1207,1212 **** wxLuaStackListData* stkListData = (wxLuaStackListData*)m_listData[i]; ! if (stkListData != NULL) ! delete stkListData; } --- 1206,1210 ---- wxLuaStackListData* stkListData = (wxLuaStackListData*)m_listData[i]; ! delete stkListData; } *************** *** 1263,1267 **** // Sanity check to make sure that we've cleared all the references // There should be only one of us created at any time. ! if (0) { //wxLuaCheckStack cs(L, wxT("wxLuaStackDialog::RemoveAllLuaReferences")); lua_pushlightuserdata(L, &wxlua_lreg_debug_refs_key); // push name of table to get as key --- 1261,1265 ---- // Sanity check to make sure that we've cleared all the references // There should be only one of us created at any time. ! if (1) { //wxLuaCheckStack cs(L, wxT("wxLuaStackDialog::RemoveAllLuaReferences")); lua_pushlightuserdata(L, &wxlua_lreg_debug_refs_key); // push name of table to get as key *************** *** 1281,1285 **** lua_pop(L, 1); // pop ref table ! } // Clear out the old numeric references since it should be "empty" // though full of dead table[idx]=next_idx, where table[0] = 1; --- 1279,1283 ---- lua_pop(L, 1); // pop ref table ! } // Clear out the old numeric references since it should be "empty" // though full of dead table[idx]=next_idx, where table[0] = 1; Index: wxldebug.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxldebug.cpp,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** wxldebug.cpp 15 Nov 2009 17:56:04 -0000 1.70 --- wxldebug.cpp 17 Nov 2009 06:11:03 -0000 1.71 *************** *** 139,142 **** --- 139,143 ---- long l1 = 0, l2 = 0; + // Don't sort numbers by their string representation, but by their value if ((elem1->m_itemKeyType == WXLUA_TNUMBER) && (elem2->m_itemKeyType == WXLUA_TNUMBER) && *************** *** 222,225 **** --- 223,227 ---- int stack_idx = 1; wxString name(lua2wx(lua_getlocal(L, &luaDebug, stack_idx))); + while (!name.IsEmpty()) { *************** *** 540,545 **** int wxl_type = wxlua_luatowxluatype(l_type); - if (wxl_type_) *wxl_type_ = wxl_type; - switch (l_type) { --- 542,545 ---- *************** *** 611,614 **** --- 611,616 ---- } + if (wxl_type_) *wxl_type_ = wxl_type; + return l_type; } |
From: John L. <jr...@us...> - 2009-11-17 06:11:12
|
Update of /cvsroot/wxlua/wxLua/apps/wxluacan/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv2334/wxLua/apps/wxluacan/src Modified Files: canlua.cpp canlua.h Log Message: Make collapsing in the wxLuaStackDialog MUCH faster by not recursively calling Collapse(). Tabs to spaces in wxluacan. Index: canlua.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/canlua.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** canlua.h 14 Aug 2007 13:42:13 -0000 1.9 --- canlua.h 17 Nov 2009 06:11:03 -0000 1.10 *************** *** 30,35 **** //! base canvas object /*! ! this and derived objects or placed on the canvas in the m_rootobject or as a child of another canvasobject. ! This way nested structures can be made. */ class wxlCanObj: public wxEvtHandler --- 30,35 ---- //! base canvas object /*! ! this and derived objects or placed on the canvas in the m_rootobject or as a child of another canvasobject. ! This way nested structures can be made. */ class wxlCanObj: public wxEvtHandler *************** *** 38,99 **** public: ! //! constructor ! /*! ! This object can have child objects added, and acts as a grouping object. ! All derived object can have childs too. ! */ ! wxlCanObj( double x = 0, double y = 0 ); virtual ~wxlCanObj(); ! //! sets the position of the object relative to its parent object. ! void SetPos( double x, double y ) { m_x = x; m_y = y; SetPending( true ); } ! //! get x positions double GetX() { return m_x; } ! //! get y positions double GetY() { return m_y; } ! //! set default pen to use for drawing ! void SetPen( const wxPen& pen ) { m_pen = pen; } ! //! set default brush to use for drawing ! void SetBrush( const wxBrush& brush ) { m_brush = brush; } ! //! called when there is a pending objects in the canvas ! /*! ! when this specific object was set pending, it can update its state. ! */ ! void Update( double absx, double absy ); ! //! draw the object at an absolute position. ! void Draw( wxDC& dc, double absx, double absy ); ! //! hit test all child objects in this object at an absolute position. ! wxlCanObj* WhichIsHit( double x, double y ); ! //! hit test the object at an absolute position. ! bool IsHit( double x, double y, double absx = 0, double absy = 0); ! //! the object is part of this canvas ! void SetCanvas( wxlCan* canvas ) { m_canvas = canvas; } ! //! add a child object ! void AddObject( wxlCanObj *canobj ); ! //! get child object at index wxlCanObj* GetItem( size_t index ); ! //! something changed in this object, it needs an update and re-draw void SetPending( bool pending = true ); ! //! child objects ! wxlCanObjList m_objects; protected: virtual void DoUpdate( double WXUNUSED(absx), double WXUNUSED(absy) ) ! { ! m_pending = false; ! } virtual void DoDraw( wxDC& WXUNUSED(dc), double WXUNUSED(absx), double WXUNUSED(absy) ) {} --- 38,99 ---- public: ! //! constructor ! /*! ! This object can have child objects added, and acts as a grouping object. ! All derived object can have childs too. ! */ ! wxlCanObj( double x = 0, double y = 0 ); virtual ~wxlCanObj(); ! //! sets the position of the object relative to its parent object. ! void SetPos( double x, double y ) { m_x = x; m_y = y; SetPending( true ); } ! //! get x positions double GetX() { return m_x; } ! //! get y positions double GetY() { return m_y; } ! //! set default pen to use for drawing ! void SetPen( const wxPen& pen ) { m_pen = pen; } ! //! set default brush to use for drawing ! void SetBrush( const wxBrush& brush ) { m_brush = brush; } ! //! called when there is a pending objects in the canvas ! /*! ! when this specific object was set pending, it can update its state. ! */ ! void Update( double absx, double absy ); ! //! draw the object at an absolute position. ! void Draw( wxDC& dc, double absx, double absy ); ! //! hit test all child objects in this object at an absolute position. ! wxlCanObj* WhichIsHit( double x, double y ); ! //! hit test the object at an absolute position. ! bool IsHit( double x, double y, double absx = 0, double absy = 0); ! //! the object is part of this canvas ! void SetCanvas( wxlCan* canvas ) { m_canvas = canvas; } ! //! add a child object ! void AddObject( wxlCanObj *canobj ); ! //! get child object at index wxlCanObj* GetItem( size_t index ); ! //! something changed in this object, it needs an update and re-draw void SetPending( bool pending = true ); ! //! child objects ! wxlCanObjList m_objects; protected: virtual void DoUpdate( double WXUNUSED(absx), double WXUNUSED(absy) ) ! { ! m_pending = false; ! } virtual void DoDraw( wxDC& WXUNUSED(dc), double WXUNUSED(absx), double WXUNUSED(absy) ) {} *************** *** 101,112 **** virtual bool DoIsHit( double WXUNUSED(x), double WXUNUSED(y), double WXUNUSED(absx), double WXUNUSED(absy) ) { return false; } ! wxBrush m_brush; ! wxPen m_pen; ! wxlCan* m_canvas; ! double m_x, m_y; ! bool m_pending; }; --- 101,112 ---- virtual bool DoIsHit( double WXUNUSED(x), double WXUNUSED(y), double WXUNUSED(absx), double WXUNUSED(absy) ) { return false; } ! wxBrush m_brush; ! wxPen m_pen; ! wxlCan* m_canvas; ! double m_x, m_y; ! bool m_pending; }; *************** *** 114,118 **** //! rectangle canvas object /*! ! to be placed on the canvas in the m_rootobject or as a child of another canvasobject */ class wxlCanObjRect: public wxlCanObj --- 114,118 ---- //! rectangle canvas object /*! ! to be placed on the canvas in the m_rootobject or as a child of another canvasobject */ class wxlCanObjRect: public wxlCanObj *************** *** 121,127 **** public: ! wxlCanObjRect( double x, double y, double w, double h ); ! void DoDraw( wxDC& dc, double absx, double absy ); bool DoIsHit( double x, double y, double absx, double absy ); --- 121,127 ---- public: ! wxlCanObjRect( double x, double y, double w, double h ); ! void DoDraw( wxDC& dc, double absx, double absy ); bool DoIsHit( double x, double y, double absx, double absy ); *************** *** 129,138 **** protected: ! double m_w, m_h; }; //! circle canvas object /*! ! to be placed on the canvas in the m_rootobject or as a child of another canvasobject */ class wxlCanObjCircle: public wxlCanObj --- 129,138 ---- protected: ! double m_w, m_h; }; //! circle canvas object /*! ! to be placed on the canvas in the m_rootobject or as a child of another canvasobject */ class wxlCanObjCircle: public wxlCanObj *************** *** 141,147 **** public: ! wxlCanObjCircle( double x, double y, double r ); ! void DoDraw( wxDC& dc, double absx, double absy ); bool DoIsHit( double x, double y, double absx, double absy ); --- 141,147 ---- public: ! wxlCanObjCircle( double x, double y, double r ); ! void DoDraw( wxDC& dc, double absx, double absy ); bool DoIsHit( double x, double y, double absx, double absy ); *************** *** 149,165 **** protected: ! double m_r; }; //! lua script canvas object /*! ! to be placed on the canvas in the m_rootobject or as a child of another canvasobject. ! The object name, is used to call a lua function fron DoDraw() called ! NameDraw( wxDC& dc, double absx, double absy ) to draw the object ! And in DoIsHit() ! NameHit( double x, double y ) to hit test the object */ --- 149,165 ---- protected: ! double m_r; }; //! lua script canvas object /*! ! to be placed on the canvas in the m_rootobject or as a child of another canvasobject. ! The object name, is used to call a lua function fron DoDraw() called ! NameDraw( wxDC& dc, double absx, double absy ) to draw the object ! And in DoIsHit() ! NameHit( double x, double y ) to hit test the object */ *************** *** 169,175 **** public: ! wxlCanObjScript( double x, double y, const wxString& name ); ! void DoDraw( wxDC& dc, double absx, double absy ); bool DoIsHit( double x, double y, double absx, double absy ); --- 169,175 ---- public: ! wxlCanObjScript( double x, double y, const wxString& name ); ! void DoDraw( wxDC& dc, double absx, double absy ); bool DoIsHit( double x, double y, double absx, double absy ); *************** *** 177,189 **** protected: ! wxString m_objectname; }; //! lua script canvas object /*! ! to be placed on the canvas in the m_rootobject or as a child of another canvasobject. ! The lua script in m_script will contain a function to generate the drawing for the object. ! It should do that by adding child objects to this object itself. ! The hit is no more then a hit on those childs, which is default functionality. */ class wxlCanObjAddScript: public wxlCanObj --- 177,189 ---- protected: ! wxString m_objectname; }; //! lua script canvas object /*! ! to be placed on the canvas in the m_rootobject or as a child of another canvasobject. ! The lua script in m_script will contain a function to generate the drawing for the object. ! It should do that by adding child objects to this object itself. ! The hit is no more then a hit on those childs, which is default functionality. */ class wxlCanObjAddScript: public wxlCanObj *************** *** 192,198 **** public: ! wxlCanObjAddScript( double x, double y, const wxString& script ); ! void SetScript( const wxString& script ); protected: --- 192,198 ---- public: ! wxlCanObjAddScript( double x, double y, const wxString& script ); ! void SetScript( const wxString& script ); protected: *************** *** 200,204 **** virtual void DoUpdate( double absx, double absy ); ! wxString m_script; }; --- 200,204 ---- virtual void DoUpdate( double absx, double absy ); ! wxString m_script; }; *************** *** 239,250 **** virtual void SetYaxis(bool up); ! void SetBackgroundBrush( const wxBrush& brush ); void SetPending( bool pending = true ); ! void Render( wxDC& dc ); //! Give the virtual size to be displayed. ! /*! To display all of a drawing, set this here to the boundingbox of the root object of the canvas. --- 239,250 ---- virtual void SetYaxis(bool up); ! void SetBackgroundBrush( const wxBrush& brush ); void SetPending( bool pending = true ); ! void Render( wxDC& dc ); //! Give the virtual size to be displayed. ! /*! To display all of a drawing, set this here to the boundingbox of the root object of the canvas. *************** *** 291,295 **** inline int WorldToDeviceY(double y) const { return (int) floor(m_scaley * y + m_transy + 0.5); } ! void AddObject( wxlCanObj *canobj ); wxlLuaCanCmd* GetCmdh() { return m_cmdh; } --- 291,295 ---- inline int WorldToDeviceY(double y) const { return (int) floor(m_scaley * y + m_transy + 0.5); } ! void AddObject( wxlCanObj *canobj ); wxlLuaCanCmd* GetCmdh() { return m_cmdh; } *************** *** 303,307 **** protected: ! void OnMouseEvent(wxMouseEvent& event); //! redraw pending objects to the buffer --- 303,307 ---- protected: ! void OnMouseEvent(wxMouseEvent& event); //! redraw pending objects to the buffer *************** *** 314,320 **** void OnPaint( wxPaintEvent &event ); ! void OnScroll(wxScrollWinEvent& event); ! void OnEraseBackground(wxEraseEvent& WXUNUSED(event) ); private: --- 314,320 ---- void OnPaint( wxPaintEvent &event ); ! void OnScroll(wxScrollWinEvent& event); ! void OnEraseBackground(wxEraseEvent& WXUNUSED(event) ); private: *************** *** 324,330 **** wxLuaState* m_luastate; ! wxBitmap m_buffer; ! bool m_pendingObjects; //! virtual coordinates box its miminum X --- 324,330 ---- wxLuaState* m_luastate; ! wxBitmap m_buffer; ! bool m_pendingObjects; //! virtual coordinates box its miminum X *************** *** 355,359 **** bool m_yaxis; ! wxBrush m_backbrush; wxlCanObj m_rootobject; --- 355,359 ---- bool m_yaxis; ! wxBrush m_backbrush; wxlCanObj m_rootobject; Index: canlua.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/canlua.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** canlua.cpp 26 Jan 2008 22:28:01 -0000 1.16 --- canlua.cpp 17 Nov 2009 06:11:02 -0000 1.17 *************** *** 32,40 **** wxlCanObj::wxlCanObj( double x, double y ) { ! m_x = x; ! m_y = y; m_brush = wxNullBrush; ! m_pen = wxNullPen; m_canvas = NULL; --- 32,40 ---- wxlCanObj::wxlCanObj( double x, double y ) { ! m_x = x; ! m_y = y; m_brush = wxNullBrush; ! m_pen = wxNullPen; m_canvas = NULL; *************** *** 43,55 **** wxlCanObj::~wxlCanObj() { ! m_objects.DeleteContents( true ); ! m_objects.Clear(); } void wxlCanObj::AddObject( wxlCanObj *canobj ) { ! canobj->SetCanvas( m_canvas ); ! m_objects.Append( canobj ); ! SetPending( true ); } --- 43,55 ---- wxlCanObj::~wxlCanObj() { ! m_objects.DeleteContents( true ); ! m_objects.Clear(); } void wxlCanObj::AddObject( wxlCanObj *canobj ) { ! canobj->SetCanvas( m_canvas ); ! m_objects.Append( canobj ); ! SetPending( true ); } *************** *** 61,65 **** void wxlCanObj::SetPending( bool pending ) { ! m_pending = pending; m_canvas->SetPending( pending ); } --- 61,65 ---- void wxlCanObj::SetPending( bool pending ) { ! m_pending = pending; m_canvas->SetPending( pending ); } *************** *** 70,74 **** absy += m_y; ! DoUpdate( absx, absy ); // iterate over the child list --- 70,74 ---- absy += m_y; ! DoUpdate( absx, absy ); // iterate over the child list *************** *** 76,80 **** { wxlCanObj *obj = node->GetData(); ! obj->Update( absx, absy ); } } --- 76,80 ---- { wxlCanObj *obj = node->GetData(); ! obj->Update( absx, absy ); } } *************** *** 82,97 **** void wxlCanObj::Draw( wxDC& dc, double absx, double absy ) { ! if ( m_brush.Ok() ) ! dc.SetBrush( m_brush ); ! if ( m_pen.Ok() ) ! dc.SetPen( m_pen ); ! wxBrush currentBrush = dc.GetBrush(); ! wxPen currentPen = dc.GetPen(); absx += m_x; absy += m_y; ! DoDraw( dc, absx, absy ); // iterate over the child list --- 82,97 ---- void wxlCanObj::Draw( wxDC& dc, double absx, double absy ) { ! if ( m_brush.Ok() ) ! dc.SetBrush( m_brush ); ! if ( m_pen.Ok() ) ! dc.SetPen( m_pen ); ! wxBrush currentBrush = dc.GetBrush(); ! wxPen currentPen = dc.GetPen(); absx += m_x; absy += m_y; ! DoDraw( dc, absx, absy ); // iterate over the child list *************** *** 99,106 **** { wxlCanObj *drawobj = node->GetData(); ! // restore brush and pen ! dc.SetBrush( currentBrush ); ! dc.SetPen( currentPen ); ! drawobj->Draw( dc , absx, absy ); } } --- 99,106 ---- { wxlCanObj *drawobj = node->GetData(); ! // restore brush and pen ! dc.SetBrush( currentBrush ); ! dc.SetPen( currentPen ); ! drawobj->Draw( dc , absx, absy ); } } *************** *** 112,116 **** { wxlCanObj *drawobj = node->GetData(); ! if ( drawobj->IsHit( x, y ) ) return drawobj; } --- 112,116 ---- { wxlCanObj *drawobj = node->GetData(); ! if ( drawobj->IsHit( x, y ) ) return drawobj; } *************** *** 123,127 **** absy += m_y; ! if ( DoIsHit( x, y, absx, absy ) ) return true; --- 123,127 ---- absy += m_y; ! if ( DoIsHit( x, y, absx, absy ) ) return true; *************** *** 143,154 **** :wxlCanObj( x, y ) { ! m_w = w; ! m_h = h; } void wxlCanObjRect::DoDraw( wxDC& dc, double absx, double absy ) { ! dc.DrawRectangle( m_canvas->WorldToDeviceX( absx ), m_canvas->WorldToDeviceX( absy ), ! m_canvas->WorldToDeviceXRel( m_w ), m_canvas->WorldToDeviceYRel( m_h ) ); } --- 143,154 ---- :wxlCanObj( x, y ) { ! m_w = w; ! m_h = h; } void wxlCanObjRect::DoDraw( wxDC& dc, double absx, double absy ) { ! dc.DrawRectangle( m_canvas->WorldToDeviceX( absx ), m_canvas->WorldToDeviceX( absy ), ! m_canvas->WorldToDeviceXRel( m_w ), m_canvas->WorldToDeviceYRel( m_h ) ); } *************** *** 184,193 **** :wxlCanObj( x, y ) { ! m_r = r; } void wxlCanObjCircle::DoDraw( wxDC& dc, double absx, double absy ) { ! dc.DrawCircle( m_canvas->WorldToDeviceX( absx ), m_canvas->WorldToDeviceX( absy ), m_canvas->WorldToDeviceXRel( m_r ) ); } --- 184,193 ---- :wxlCanObj( x, y ) { ! m_r = r; } void wxlCanObjCircle::DoDraw( wxDC& dc, double absx, double absy ) { ! dc.DrawCircle( m_canvas->WorldToDeviceX( absx ), m_canvas->WorldToDeviceX( absy ), m_canvas->WorldToDeviceXRel( m_r ) ); } *************** *** 219,223 **** void wxlCanObjScript::DoDraw( wxDC& dc, double absx, double absy ) { ! // run all statements in the script which should be drawing statements on a wxDC wxLuaState lst = *(m_canvas->GetLuastate()); lua_State* L = lst.GetLuaState(); --- 219,223 ---- void wxlCanObjScript::DoDraw( wxDC& dc, double absx, double absy ) { ! // run all statements in the script which should be drawing statements on a wxDC wxLuaState lst = *(m_canvas->GetLuastate()); lua_State* L = lst.GetLuaState(); *************** *** 243,247 **** yh = y - absy; ! // run all statements in the script which should be returning a hit on the object or not wxLuaState lst = *(m_canvas->GetLuastate()); --- 243,247 ---- yh = y - absy; ! // run all statements in the script which should be returning a hit on the object or not wxLuaState lst = *(m_canvas->GetLuastate()); *************** *** 277,308 **** :wxlCanObj( x, y ) { ! m_script = script; } void wxlCanObjAddScript::SetScript( const wxString& script ) { ! m_script = script; ! SetPending( true ); } void wxlCanObjAddScript::DoUpdate( double absx, double absy ) { ! if ( m_pending ) ! { ! wxLuaState lst = *(m_canvas->GetLuastate()); ! lua_State* L = lst.GetLuaState(); ! if ( 0 != lst.RunString( m_script ) ) ! { ! wxLogWarning( _("Error in Lua Script") ); ! } ! else ! { ! lua_getglobal( L, wx2lua( wxT("AddChilds") ) ); ! lst.wxluaT_PushUserDataType(this, wxluatype_wxlCanObj, true); ! lst.lua_PushNumber( m_canvas->WorldToDeviceX( absx ) ); ! lst.lua_PushNumber( m_canvas->WorldToDeviceX( absy ) ); ! if ( lst.lua_PCall( 3, 0, 0 ) != 0 ) { wxLuaEvent event(wxEVT_LUA_ERROR, lst.GetId(), lst); --- 277,308 ---- :wxlCanObj( x, y ) { ! m_script = script; } void wxlCanObjAddScript::SetScript( const wxString& script ) { ! m_script = script; ! SetPending( true ); } void wxlCanObjAddScript::DoUpdate( double absx, double absy ) { ! if ( m_pending ) ! { ! wxLuaState lst = *(m_canvas->GetLuastate()); ! lua_State* L = lst.GetLuaState(); ! if ( 0 != lst.RunString( m_script ) ) ! { ! wxLogWarning( _("Error in Lua Script") ); ! } ! else ! { ! lua_getglobal( L, wx2lua( wxT("AddChilds") ) ); ! lst.wxluaT_PushUserDataType(this, wxluatype_wxlCanObj, true); ! lst.lua_PushNumber( m_canvas->WorldToDeviceX( absx ) ); ! lst.lua_PushNumber( m_canvas->WorldToDeviceX( absy ) ); ! if ( lst.lua_PCall( 3, 0, 0 ) != 0 ) { wxLuaEvent event(wxEVT_LUA_ERROR, lst.GetId(), lst); *************** *** 310,316 **** lst.SendEvent(event); } ! } ! m_pending = false; ! } } --- 310,316 ---- lst.SendEvent(event); } ! } ! m_pending = false; ! } } *************** *** 341,345 **** m_buffer = wxBitmap( size.GetWidth(), size.GetHeight() ); ! m_pendingObjects = false; //set one to one mapping as default --- 341,345 ---- m_buffer = wxBitmap( size.GetWidth(), size.GetHeight() ); ! m_pendingObjects = false; //set one to one mapping as default *************** *** 356,360 **** m_scaley = 1; ! m_rootobject.SetCanvas( this ); m_hit = NULL; --- 356,360 ---- m_scaley = 1; ! m_rootobject.SetCanvas( this ); m_hit = NULL; *************** *** 371,381 **** void wxlCan::OnEraseBackground(wxEraseEvent& WXUNUSED(event) ) { ! //event.Skip(); } void wxlCan::SetBackgroundBrush( const wxBrush& brush ) { ! m_backbrush = brush; ! m_pendingObjects = true; } --- 371,381 ---- void wxlCan::OnEraseBackground(wxEraseEvent& WXUNUSED(event) ) { ! //event.Skip(); } void wxlCan::SetBackgroundBrush( const wxBrush& brush ) { ! m_backbrush = brush; ! m_pendingObjects = true; } *************** *** 390,395 **** void wxlCan::SetMappingUpp( double vx1, double vy1, double xpp, double ypp ) { ! //double wx = m_buffer.GetWidth(); ! double wy = m_buffer.GetHeight(); m_xpp = xpp; --- 390,395 ---- void wxlCan::SetMappingUpp( double vx1, double vy1, double xpp, double ypp ) { ! //double wx = m_buffer.GetWidth(); ! double wy = m_buffer.GetHeight(); m_xpp = xpp; *************** *** 430,435 **** } ! m_pendingObjects = true; ! Refresh(); } --- 430,435 ---- } ! m_pendingObjects = true; ! Refresh(); } *************** *** 487,505 **** if ( m_pendingObjects ) { ! m_rootobject.Update( 0, 0 ); ! // we will now render all objects stored in the canvas to a bitmap ! wxMemoryDC mdc; ! mdc.SelectObject( m_buffer ); ! //draw object into buffer ! Render( mdc ); ! mdc.SelectObject( wxNullBitmap ); ! // force a repaint in OnPaint() ! Refresh(); ! m_pendingObjects = false; } event.Skip(); //always skip idle events --- 487,505 ---- if ( m_pendingObjects ) { ! m_rootobject.Update( 0, 0 ); ! // we will now render all objects stored in the canvas to a bitmap ! wxMemoryDC mdc; ! mdc.SelectObject( m_buffer ); ! //draw object into buffer ! Render( mdc ); ! mdc.SelectObject( wxNullBitmap ); ! // force a repaint in OnPaint() ! Refresh(); ! m_pendingObjects = false; } event.Skip(); //always skip idle events *************** *** 508,533 **** void wxlCan::AddObject( wxlCanObj *canobj ) { ! canobj->SetCanvas( this ); ! m_rootobject.AddObject( canobj ); } void wxlCan::SetPending( bool pending ) { ! m_pendingObjects = pending; } void wxlCan::Render( wxDC& dc ) { ! int w,h; ! GetVirtualSize( &w, &h ); ! dc.SetBackground( GetBackgroundColour() ); ! dc.Clear(); ! dc.SetBrush(m_backbrush); ! dc.SetPen( *wxTRANSPARENT_PEN ); ! dc.DrawRectangle( 0, 0, w, h ); ! //draw objects m_rootobject.Draw( dc, 0, 0 ); } --- 508,533 ---- void wxlCan::AddObject( wxlCanObj *canobj ) { ! canobj->SetCanvas( this ); ! m_rootobject.AddObject( canobj ); } void wxlCan::SetPending( bool pending ) { ! m_pendingObjects = pending; } void wxlCan::Render( wxDC& dc ) { ! int w,h; ! GetVirtualSize( &w, &h ); ! dc.SetBackground( GetBackgroundColour() ); ! dc.Clear(); ! dc.SetBrush(m_backbrush); ! dc.SetPen( *wxTRANSPARENT_PEN ); ! dc.DrawRectangle( 0, 0, w, h ); ! //draw objects m_rootobject.Draw( dc, 0, 0 ); } *************** *** 550,559 **** CalcUnscrolledPosition( x, y, &xx, &yy); ! wxMemoryDC mdc; ! mdc.SelectObject( m_buffer ); ! dc.Blit( x, y, w, h, &mdc, xx, yy, wxCOPY, false ); ! mdc.SelectObject( wxNullBitmap ); it++; --- 550,559 ---- CalcUnscrolledPosition( x, y, &xx, &yy); ! wxMemoryDC mdc; ! mdc.SelectObject( m_buffer ); ! dc.Blit( x, y, w, h, &mdc, xx, yy, wxCOPY, false ); ! mdc.SelectObject( wxNullBitmap ); it++; *************** *** 567,573 **** GetClientSize(&dx,&dy); ! wxScrolledWindow::OnScroll( event ); ! m_pendingObjects = true; } --- 567,573 ---- GetClientSize(&dx,&dy); ! wxScrolledWindow::OnScroll( event ); ! m_pendingObjects = true; } *************** *** 580,590 **** GetVirtualSize( &w, &h ); ! if ( w < dx ) ! w = dx; ! if ( h < dy ) ! h = dy; m_buffer = wxBitmap( w, h ); ! m_pendingObjects = true; } --- 580,590 ---- GetVirtualSize( &w, &h ); ! if ( w < dx ) ! w = dx; ! if ( h < dy ) ! h = dy; m_buffer = wxBitmap( w, h ); ! m_pendingObjects = true; } |
From: John L. <jr...@us...> - 2009-11-15 17:56:14
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv32122/wxLua/modules/wxluasocket/src Modified Files: wxldtarg.cpp Log Message: Speedup the wxLuaStackDialog by passing the lua_State instead of the wxLuaState and use wxString::Printf() instead of wxString::Format() Index: wxldtarg.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxldtarg.cpp,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** wxldtarg.cpp 24 Jun 2009 19:57:41 -0000 1.48 --- wxldtarg.cpp 15 Nov 2009 17:56:04 -0000 1.49 *************** *** 454,458 **** EnterLuaCriticalSection(); ! debugData.EnumerateStack(m_wxlState); LeaveLuaCriticalSection(); --- 454,458 ---- EnterLuaCriticalSection(); ! debugData.EnumerateStack(m_wxlState.GetLuaState()); LeaveLuaCriticalSection(); *************** *** 465,469 **** EnterLuaCriticalSection(); ! debugData.EnumerateStackEntry(m_wxlState, stackRef, m_references); LeaveLuaCriticalSection(); --- 465,469 ---- EnterLuaCriticalSection(); ! debugData.EnumerateStackEntry(m_wxlState.GetLuaState(), stackRef, m_references); LeaveLuaCriticalSection(); *************** *** 476,480 **** EnterLuaCriticalSection(); ! debugData.EnumerateTable(m_wxlState, tableRef, nIndex, m_references); LeaveLuaCriticalSection(); --- 476,480 ---- EnterLuaCriticalSection(); ! debugData.EnumerateTable(m_wxlState.GetLuaState(), tableRef, nIndex, m_references); LeaveLuaCriticalSection(); *************** *** 570,574 **** int wxl_type = 0; wxString value; ! wxLuaDebugData::GetTypeValue(m_wxlState, -1, &wxl_type, value); strResult.Printf(wxT("%s : %s"), wxluaT_typename(L, wxl_type).c_str(), value.c_str()); --- 570,574 ---- int wxl_type = 0; wxString value; ! wxLuaDebugData::GetTypeValue(L, -1, &wxl_type, value); strResult.Printf(wxT("%s : %s"), wxluaT_typename(L, wxl_type).c_str(), value.c_str()); |
From: John L. <jr...@us...> - 2009-11-15 17:56:13
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/include In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv32122/wxLua/modules/wxluadebug/include Modified Files: wxldebug.h Log Message: Speedup the wxLuaStackDialog by passing the lua_State instead of the wxLuaState and use wxString::Printf() instead of wxString::Format() Index: wxldebug.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/wxldebug.h,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** wxldebug.h 5 Oct 2009 02:51:29 -0000 1.51 --- wxldebug.h 15 Nov 2009 17:56:04 -0000 1.52 *************** *** 134,146 **** // fill this with the stack entries for the wxLuaState // returns the number of stack entries added ! int EnumerateStack(const wxLuaState& wxlState); // fill this with the locals from a particular stack frame, if an item on the stack is a // table then add a reference to it in the references array ! int EnumerateStackEntry(const wxLuaState& wxlState, int stack_frame, wxArrayInt& references); // Fill this with the name and value of items in a table at the given reference // in the wxlua_lreg_debug_refs_key in the LUA_REGISTRYINDEX. // nRef may also be LUA_GLOBALSINDEX and LUA_REGISTRYINDEX. // If the table has a sub table then add a reference to it to the references array. ! int EnumerateTable(const wxLuaState& wxlState, int nRef, int nEntry, wxArrayInt& references); //------------------------------------------------------------------------- --- 134,146 ---- // fill this with the stack entries for the wxLuaState // returns the number of stack entries added ! int EnumerateStack(lua_State* L); // fill this with the locals from a particular stack frame, if an item on the stack is a // table then add a reference to it in the references array ! int EnumerateStackEntry(lua_State* L, int stack_frame, wxArrayInt& references); // Fill this with the name and value of items in a table at the given reference // in the wxlua_lreg_debug_refs_key in the LUA_REGISTRYINDEX. // nRef may also be LUA_GLOBALSINDEX and LUA_REGISTRYINDEX. // If the table has a sub table then add a reference to it to the references array. ! int EnumerateTable(lua_State* L, int nRef, int nEntry, wxArrayInt& references); //------------------------------------------------------------------------- *************** *** 150,159 **** // Get information about the item at the 'stack_idx'. Returns the lua_type(L, stack_idx), // fills 'wxl_type' with the WXLUA_TXXX type and 'value' with a human readable value. ! static int GetTypeValue(const wxLuaState& wxlState, int stack_idx, int* wxl_type, wxString& value); // Get a wxString description about the table at the stack_idx in the Lua stack ! static wxString GetTableInfo(const wxLuaState& wxlState, int stack_idx); // Get a wxString description about user data at the stack_idx in the Lua stack // if full then try to look up the name of the user data from the bindings ! static wxString GetUserDataInfo(const wxLuaState& wxlState, int stack_idx, bool full_userdata); //------------------------------------------------------------------------- --- 150,159 ---- // Get information about the item at the 'stack_idx'. Returns the lua_type(L, stack_idx), // fills 'wxl_type' with the WXLUA_TXXX type and 'value' with a human readable value. ! static int GetTypeValue(lua_State *L, int stack_idx, int* wxl_type, wxString& value); // Get a wxString description about the table at the stack_idx in the Lua stack ! static wxString GetTableInfo(lua_State *L, int stack_idx); // Get a wxString description about user data at the stack_idx in the Lua stack // if full then try to look up the name of the user data from the bindings ! static wxString GetUserDataInfo(lua_State *L, int stack_idx, bool full_userdata); //------------------------------------------------------------------------- |
From: John L. <jr...@us...> - 2009-11-15 17:56:13
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv32122/wxLua/modules/wxluadebug/src Modified Files: wxldebug.cpp wxlstack.cpp Log Message: Speedup the wxLuaStackDialog by passing the lua_State instead of the wxLuaState and use wxString::Printf() instead of wxString::Format() Index: wxlstack.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxlstack.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** wxlstack.cpp 5 Oct 2009 02:51:29 -0000 1.31 --- wxlstack.cpp 15 Nov 2009 17:56:04 -0000 1.32 *************** *** 511,515 **** wxBusyCursor wait; wxLuaDebugData debugData(true); ! debugData.EnumerateStack(m_wxlState); FillStackCombobox(debugData); } --- 511,515 ---- wxBusyCursor wait; wxLuaDebugData debugData(true); ! debugData.EnumerateStack(m_wxlState.GetLuaState()); FillStackCombobox(debugData); } *************** *** 519,523 **** wxBusyCursor wait; wxLuaDebugData debugData(true); ! debugData.EnumerateStackEntry(m_wxlState, nEntry, m_luaReferences); FillStackEntry(nEntry, debugData); } --- 519,523 ---- wxBusyCursor wait; wxLuaDebugData debugData(true); ! debugData.EnumerateStackEntry(m_wxlState.GetLuaState(), nEntry, m_luaReferences); FillStackEntry(nEntry, debugData); } *************** *** 527,531 **** wxBusyCursor wait; wxLuaDebugData debugData(true); ! debugData.EnumerateTable(m_wxlState, nRef, nEntry, m_luaReferences); FillTableEntry(lc_item, debugData); } --- 527,531 ---- wxBusyCursor wait; wxLuaDebugData debugData(true); ! debugData.EnumerateTable(m_wxlState.GetLuaState(), nRef, nEntry, m_luaReferences); FillTableEntry(lc_item, debugData); } *************** *** 571,575 **** wxLuaDebugItem* localItem = new wxLuaDebugItem(_("Locals"), WXLUA_TNONE, wxString::Format(wxT("%d Items"), (int)debugData.GetCount()), WXLUA_TNONE, ! wxT(""), LUA_NOREF, 0, WXLUA_DEBUGITEM_EXPANDED|WXLUA_DEBUGITEM_LOCALS|WXLUA_DEBUGITEM_VALUE_REF); wxLuaDebugData localData(true); // this deletes the items localData.Add(localItem); --- 571,575 ---- wxLuaDebugItem* localItem = new wxLuaDebugItem(_("Locals"), WXLUA_TNONE, wxString::Format(wxT("%d Items"), (int)debugData.GetCount()), WXLUA_TNONE, ! wxEmptyString, LUA_NOREF, 0, WXLUA_DEBUGITEM_EXPANDED|WXLUA_DEBUGITEM_LOCALS|WXLUA_DEBUGITEM_VALUE_REF); wxLuaDebugData localData(true); // this deletes the items localData.Add(localItem); *************** *** 1100,1104 **** if ((n > lc_item) && (stkListData_n->m_level <= level)) break; ! if (counter % 20 == 0) { if (!dlg->Pulse(wxString::Format(wxT("Expanding nodes : %d"), counter))) --- 1100,1104 ---- if ((n > lc_item) && (stkListData_n->m_level <= level)) break; ! if (counter % 50 == 0) { if (!dlg->Pulse(wxString::Format(wxT("Expanding nodes : %d"), counter))) *************** *** 1124,1128 **** { wxCHECK_MSG((lc_item >= 0) && (lc_item < m_listCtrl->GetItemCount()), false, ! wxT("Invalid list item to expand")); bool collapsed = false; --- 1124,1128 ---- { wxCHECK_MSG((lc_item >= 0) && (lc_item < m_listCtrl->GetItemCount()), false, ! wxT("Invalid list item to collapse")); bool collapsed = false; *************** *** 1132,1142 **** wxLuaDebugItem* debugItem = stkListData->GetDebugItem(); wxCHECK_MSG((debugItem != NULL), false, wxT("Invalid debug item")); - wxLuaDebugData childData = stkListData->m_childrenDebugData; - - BeginBatch(); // Collapse the item, remove children if (debugItem->GetFlagBit(WXLUA_DEBUGITEM_EXPANDED)) { if (childData.Ok()) { --- 1132,1142 ---- wxLuaDebugItem* debugItem = stkListData->GetDebugItem(); wxCHECK_MSG((debugItem != NULL), false, wxT("Invalid debug item")); // Collapse the item, remove children if (debugItem->GetFlagBit(WXLUA_DEBUGITEM_EXPANDED)) { + BeginBatch(); + wxLuaDebugData childData = stkListData->m_childrenDebugData; + if (childData.Ok()) { *************** *** 1189,1197 **** if (debugItem->GetRefPtr(long_key)) m_expandedItems.erase(long_key); - } ! EndBatch(); ! ! m_listCtrl->SetItemCount(m_listData.GetCount()); return collapsed; --- 1189,1196 ---- if (debugItem->GetRefPtr(long_key)) m_expandedItems.erase(long_key); ! m_listCtrl->SetItemCount(m_listData.GetCount()); ! EndBatch(); ! } return collapsed; *************** *** 1260,1267 **** m_luaReferences.Clear(); // ---------------------------------------------------------------------- // Sanity check to make sure that we've cleared all the references // There should be only one of us created at any time. ! //wxLuaCheckStack cs(L, wxT("wxLuaStackDialog::RemoveAllLuaReferences")); lua_pushlightuserdata(L, &wxlua_lreg_debug_refs_key); // push name of table to get as key --- 1259,1267 ---- m_luaReferences.Clear(); + // ---------------------------------------------------------------------- // Sanity check to make sure that we've cleared all the references // There should be only one of us created at any time. ! if (0) { //wxLuaCheckStack cs(L, wxT("wxLuaStackDialog::RemoveAllLuaReferences")); lua_pushlightuserdata(L, &wxlua_lreg_debug_refs_key); // push name of table to get as key *************** *** 1281,1285 **** lua_pop(L, 1); // pop ref table ! // Clear out the old numeric references since it should be "empty" // though full of dead table[idx]=next_idx, where table[0] = 1; --- 1281,1285 ---- lua_pop(L, 1); // pop ref table ! } // Clear out the old numeric references since it should be "empty" // though full of dead table[idx]=next_idx, where table[0] = 1; Index: wxldebug.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxldebug.cpp,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** wxldebug.cpp 5 Oct 2009 02:51:29 -0000 1.69 --- wxldebug.cpp 15 Nov 2009 17:56:04 -0000 1.70 *************** *** 169,179 **** } ! int wxLuaDebugData::EnumerateStack(const wxLuaState& wxlState_) { ! wxCHECK_MSG(wxlState_.Ok(), 0, wxT("Invalid wxLuaState")); wxCHECK_MSG(M_DEBUGREFDATA != NULL, 0, wxT("Invalid ref data")); - wxLuaState wxlState(wxlState_); // unconst the state - lua_State* L = wxlState.GetLuaState(); lua_Debug luaDebug = INIT_LUA_DEBUG; int stack_frame = 0; --- 169,177 ---- } ! int wxLuaDebugData::EnumerateStack(lua_State* L) { ! wxCHECK_MSG(L, 0, wxT("Invalid lua_State")); wxCHECK_MSG(M_DEBUGREFDATA != NULL, 0, wxT("Invalid ref data")); lua_Debug luaDebug = INIT_LUA_DEBUG; int stack_frame = 0; *************** *** 197,205 **** if (luaDebug.name != NULL) ! name = wxString::Format(_("function %s line %d"), lua2wx(luaDebug.name).c_str(), currentLine); else ! name = wxString::Format(_("line %d"), currentLine); ! Add(new wxLuaDebugItem(name, WXLUA_TNONE, wxT(""), WXLUA_TNONE, source, LUA_NOREF, stack_frame, WXLUA_DEBUGITEM_LOCALS)); ++count; } --- 195,203 ---- if (luaDebug.name != NULL) ! name.Printf(_("function %s line %d"), lua2wx(luaDebug.name).c_str(), currentLine); else ! name.Printf(_("line %d"), currentLine); ! Add(new wxLuaDebugItem(name, WXLUA_TNONE, wxEmptyString, WXLUA_TNONE, source, LUA_NOREF, stack_frame, WXLUA_DEBUGITEM_LOCALS)); ++count; } *************** *** 212,222 **** } ! int wxLuaDebugData::EnumerateStackEntry(const wxLuaState& wxlState_, int stack_frame, wxArrayInt& references) { ! wxCHECK_MSG(wxlState_.Ok(), 0, wxT("Invalid wxLuaState")); wxCHECK_MSG(M_DEBUGREFDATA != NULL, 0, wxT("Invalid ref data")); - wxLuaState wxlState(wxlState_); // unconst the state - lua_State* L = wxlState.GetLuaState(); lua_Debug luaDebug = INIT_LUA_DEBUG; int count = 0; --- 210,218 ---- } ! int wxLuaDebugData::EnumerateStackEntry(lua_State* L, int stack_frame, wxArrayInt& references) { ! wxCHECK_MSG(L, 0, wxT("Invalid lua_State")); wxCHECK_MSG(M_DEBUGREFDATA != NULL, 0, wxT("Invalid ref data")); lua_Debug luaDebug = INIT_LUA_DEBUG; int count = 0; *************** *** 234,238 **** wxString source(lua2wx(luaDebug.source)); ! GetTypeValue(wxlState, -1, &wxl_valuetype, value); // FIXME! local tables get the right values for GetTypeValue(...) --- 230,234 ---- wxString source(lua2wx(luaDebug.source)); ! GetTypeValue(L, -1, &wxl_valuetype, value); // FIXME! local tables get the right values for GetTypeValue(...) *************** *** 275,285 **** } ! int wxLuaDebugData::EnumerateTable(const wxLuaState& wxlState_, int tableRef, int nIndex, wxArrayInt& references) { ! wxCHECK_MSG(wxlState_.Ok(), 0, wxT("Invalid wxLuaState")); wxCHECK_MSG(M_DEBUGREFDATA != NULL, 0, wxT("Invalid ref data")); - wxLuaState wxlState(wxlState_); // unconst the state - lua_State* L = wxlState.GetLuaState(); int count = 0; --- 271,279 ---- } ! int wxLuaDebugData::EnumerateTable(lua_State* L, int tableRef, int nIndex, wxArrayInt& references) { ! wxCHECK_MSG(L, 0, wxT("Invalid lua_State")); wxCHECK_MSG(M_DEBUGREFDATA != NULL, 0, wxT("Invalid ref data")); int count = 0; *************** *** 292,296 **** { lua_pushvalue(L, LUA_GLOBALSINDEX); ! GetTypeValue(wxlState, -1, &wxl_valuetype, value); int flag_type = 0; --- 286,290 ---- { lua_pushvalue(L, LUA_GLOBALSINDEX); ! GetTypeValue(L, -1, &wxl_valuetype, value); int flag_type = 0; *************** *** 298,307 **** lua_pop(L, 1); // pop globals table ! 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; --- 292,301 ---- lua_pop(L, 1); // pop globals table ! Add(new wxLuaDebugItem(wxT("Globals"), WXLUA_TNONE, value, WXLUA_TTABLE, wxEmptyString, val_ref, 0, flag_type)); } else if (tableRef == LUA_ENVIRONINDEX) { lua_pushvalue(L, LUA_ENVIRONINDEX); ! GetTypeValue(L, -1, &wxl_valuetype, value); int flag_type = 0; *************** *** 309,318 **** 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) { lua_pushvalue(L, LUA_REGISTRYINDEX); ! GetTypeValue(wxlState, -1, &wxl_valuetype, value); int flag_type = 0; --- 303,312 ---- lua_pop(L, 1); // pop environment table ! Add(new wxLuaDebugItem(wxT("Environment"), WXLUA_TNONE, value, WXLUA_TTABLE, wxEmptyString, val_ref, 0, flag_type)); } else if (tableRef == LUA_REGISTRYINDEX) { lua_pushvalue(L, LUA_REGISTRYINDEX); ! GetTypeValue(L, -1, &wxl_valuetype, value); int flag_type = 0; *************** *** 320,324 **** lua_pop(L, 1); // pop registry table ! Add(new wxLuaDebugItem(wxT("Registry"), WXLUA_TNONE, value, WXLUA_TTABLE, wxT(""), val_ref, 0, flag_type)); } else --- 314,318 ---- lua_pop(L, 1); // pop registry table ! Add(new wxLuaDebugItem(wxT("Registry"), WXLUA_TNONE, value, WXLUA_TTABLE, wxEmptyString, val_ref, 0, flag_type)); } else *************** *** 348,352 **** { // get the type and value ! GetTypeValue(wxlState, -1, &wxl_valuetype, value); int flag_type = 0; --- 342,346 ---- { // get the type and value ! GetTypeValue(L, -1, &wxl_valuetype, value); int flag_type = 0; *************** *** 354,358 **** // leading space so it's first when sorted ! Add(new wxLuaDebugItem(wxT(" __metatable"), WXLUA_TTABLE, value, wxl_valuetype, wxT(""), val_ref, nIndex, flag_type)); ++count; --- 348,352 ---- // leading space so it's first when sorted ! Add(new wxLuaDebugItem(wxT(" __metatable"), WXLUA_TTABLE, value, wxl_valuetype, wxEmptyString, val_ref, nIndex, flag_type)); ++count; *************** *** 369,375 **** // get the key type and value ! int lua_key_type = GetTypeValue(wxlState, -2, &wxl_keytype, name); // get the value type and value ! int lua_value_type = GetTypeValue(wxlState, -1, &wxl_valuetype, value); // Handle wxLua LUA_REGISTRYINDEX tables to give more information --- 363,369 ---- // get the key type and value ! int lua_key_type = GetTypeValue(L, -2, &wxl_keytype, name); // get the value type and value ! int lua_value_type = GetTypeValue(L, -1, &wxl_valuetype, value); // Handle wxLua LUA_REGISTRYINDEX tables to give more information *************** *** 418,422 **** { int wxl_type_ = (int)lua_tonumber(L, -1); ! name = wxString::Format(wxT("%s(%s)"), wxluaT_typename(L, wxl_type_).c_str(), name.c_str()); } else if (lightuserdata_reg_key == &wxlua_lreg_weakobjects_key) --- 412,416 ---- { int wxl_type_ = (int)lua_tonumber(L, -1); ! name.Printf(wxT("%s(%s)"), wxluaT_typename(L, wxl_type_).c_str(), name.c_str()); } else if (lightuserdata_reg_key == &wxlua_lreg_weakobjects_key) *************** *** 435,439 **** } ! name = wxString::Format(wxT("%s (%s)"), names_weak.c_str(), name.c_str()); } } --- 429,433 ---- } ! name.Printf(wxT("%s (%s)"), names_weak.c_str(), name.c_str()); } } *************** *** 480,484 **** if (key_flag_type != 0) { ! Add(new wxLuaDebugItem(name, wxl_keytype, value, wxl_valuetype, wxT(""), key_ref, nIndex, key_flag_type)); ++count; } --- 474,478 ---- if (key_flag_type != 0) { ! Add(new wxLuaDebugItem(name, wxl_keytype, value, wxl_valuetype, wxEmptyString, key_ref, nIndex, key_flag_type)); ++count; } *************** *** 504,508 **** if ((key_flag_type == 0) || ((key_flag_type != 0) && (val_flag_type != 0))) { ! Add(new wxLuaDebugItem(name, wxl_keytype, value, wxl_valuetype, wxT(""), val_ref, nIndex, val_flag_type)); ++count; } --- 498,502 ---- if ((key_flag_type == 0) || ((key_flag_type != 0) && (val_flag_type != 0))) { ! Add(new wxLuaDebugItem(name, wxl_keytype, value, wxl_valuetype, wxEmptyString, val_ref, nIndex, val_flag_type)); ++count; } *************** *** 539,547 **** } ! int wxLuaDebugData::GetTypeValue(const wxLuaState& wxlState, int stack_idx, int* wxl_type_, wxString& value) { ! wxCHECK_MSG(wxlState.Ok(), 0, wxT("Invalid wxLuaState")); - lua_State* L = wxlState.GetLuaState(); int l_type = lua_type(L, stack_idx); int wxl_type = wxlua_luatowxluatype(l_type); --- 533,540 ---- } ! int wxLuaDebugData::GetTypeValue(lua_State *L, int stack_idx, int* wxl_type_, wxString& value) { ! wxCHECK_MSG(L, 0, wxT("Invalid lua_State")); int l_type = lua_type(L, stack_idx); int wxl_type = wxlua_luatowxluatype(l_type); *************** *** 568,572 **** case LUA_TLIGHTUSERDATA: { ! value = GetUserDataInfo(wxlState, stack_idx, false); break; } --- 561,565 ---- case LUA_TLIGHTUSERDATA: { ! value = GetUserDataInfo(L, stack_idx, false); break; } *************** *** 576,582 **** if ((long)num == num) ! value = wxString::Format(wxT("%ld (0x%lx)"), (long)num, (unsigned long)num); else ! value = wxString::Format(wxT("%g"), num); break; --- 569,575 ---- if ((long)num == num) ! value.Printf(wxT("%ld (0x%lx)"), (long)num, (unsigned long)num); else ! value.Printf(wxT("%g"), num); break; *************** *** 589,593 **** case LUA_TTABLE: { ! value = GetTableInfo(wxlState, stack_idx); break; } --- 582,586 ---- case LUA_TTABLE: { ! value = GetTableInfo(L, stack_idx); break; } *************** *** 603,607 **** case LUA_TUSERDATA: { ! value = GetUserDataInfo(wxlState, stack_idx, true); break; } --- 596,600 ---- case LUA_TUSERDATA: { ! value = GetUserDataInfo(L, stack_idx, true); break; } *************** *** 621,648 **** } ! wxString wxLuaDebugData::GetTableInfo(const wxLuaState& wxlState, int stack_idx) { ! wxCHECK_MSG(wxlState.Ok(), wxEmptyString, wxT("Invalid wxLuaState")); ! lua_State* L = wxlState.GetLuaState(); - int wxl_type = wxluaT_type(L, stack_idx); int nItems = luaL_getn(L, stack_idx); const void *pItem = lua_topointer(L, stack_idx); - wxString s(wxString::Format(wxT("%p"), pItem)); - if (nItems > 0) ! s += wxString::Format(wxT(" (approx %d items)"), nItems); ! ! if (wxlua_iswxuserdatatype(wxl_type)) ! s += wxString::Format(wxT(" (wxltype %d)"), wxl_type); ! return s; } ! wxString wxLuaDebugData::GetUserDataInfo(const wxLuaState& wxlState, int stack_idx, bool full_userdata) { ! wxCHECK_MSG(wxlState.Ok(), wxEmptyString, wxT("Invalid wxLuaState")); ! lua_State* L = wxlState.GetLuaState(); void* udata = lua_touserdata(L, stack_idx); --- 614,633 ---- } ! wxString wxLuaDebugData::GetTableInfo(lua_State *L, int stack_idx) { ! wxCHECK_MSG(L, wxEmptyString, wxT("Invalid lua_State")); int nItems = luaL_getn(L, stack_idx); const void *pItem = lua_topointer(L, stack_idx); if (nItems > 0) ! return wxString::Format(wxT("%p (%d array items)"), pItem, nItems); ! return wxString::Format(wxT("%p"), pItem); } ! wxString wxLuaDebugData::GetUserDataInfo(lua_State *L, int stack_idx, bool full_userdata) { ! wxCHECK_MSG(L, wxEmptyString, wxT("Invalid lua_State")); void* udata = lua_touserdata(L, stack_idx); *************** *** 744,748 **** int wxl_type = 0; wxString value; ! int l_type = wxLuaDebugData::GetTypeValue(wxlState, i, &wxl_type, value); str.Printf(wxT(" idx %d: l_type = %d, wxl_type = %d : '%s'='%s'\n"), --- 729,733 ---- int wxl_type = 0; wxString value; ! int l_type = wxLuaDebugData::GetTypeValue(L, i, &wxl_type, value); str.Printf(wxT(" idx %d: l_type = %d, wxl_type = %d : '%s'='%s'\n"), *************** *** 855,860 **** wxString key, value; ! wxLuaDebugData::GetTypeValue(wxlState, -2, &keyType, key); ! wxLuaDebugData::GetTypeValue(wxlState, -1, &valueType, value); wxString info = wxString::Format(wxT("%s%-32s\t%-16s\t%-20s\t%-16s\n"), --- 840,845 ---- wxString key, value; ! wxLuaDebugData::GetTypeValue(L, -2, &keyType, key); ! wxLuaDebugData::GetTypeValue(L, -1, &valueType, value); wxString info = wxString::Format(wxT("%s%-32s\t%-16s\t%-20s\t%-16s\n"), |
From: John L. <jr...@us...> - 2009-10-12 01:50:15
|
Update of /cvsroot/wxlua/wxLua/bindings In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv32577/wxLua/bindings Modified Files: genwxbind.lua Log Message: Allow %define_object/pointer to be used outside of a class %define_object wxPoint wxDefaultPosition Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.184 retrieving revision 1.185 diff -C2 -d -r1.184 -r1.185 *** genwxbind.lua 1 Oct 2009 04:21:00 -0000 1.184 --- genwxbind.lua 12 Oct 2009 01:50:03 -0000 1.185 *************** *** 2139,2148 **** elseif tag == "%define_object" then lineState.DefType = "deftype_%define_object" ! lineState.Action = "action_define" lineState.ActionMandatory = true elseif tag == "%define_pointer" then lineState.DefType = "deftype_%define_pointer" ! lineState.Action = "action_define" lineState.ActionMandatory = true --- 2139,2148 ---- elseif tag == "%define_object" then lineState.DefType = "deftype_%define_object" ! lineState.Action = "action_define_object" lineState.ActionMandatory = true elseif tag == "%define_pointer" then lineState.DefType = "deftype_%define_pointer" ! lineState.Action = "action_define_pointer" lineState.ActionMandatory = true *************** *** 2369,2372 **** --- 2369,2387 ---- lineState.Action = nil lineState.ActionMandatory = false + elseif (lineState.Action == "action_define_object") or (lineState.Action == "action_define_pointer") then + lineState.Name = tag + lineState.DataType = parseState.ObjectStack[1].Name + + -- If we're at the globals level they should have declared this as + -- %define_object wxPoint wxDefaultPosition + if (lineState.DataType == "globals") then + lineState.DataType = tag + lineState.Name = lineTags[t+1] + t = t + 1 + end + + lineState.Action = nil + lineState.ActionMandatory = false + elseif lineState.Action == "action_member" then *************** *** 3180,3184 **** { LuaName = luaname, ! Map = " { \""..luaname.."\", &wxluatype_"..MakeClassVar(parseObject.Name)..", &"..member.Name..", NULL },\n", Condition = fullcondition } --- 3195,3199 ---- { LuaName = luaname, ! Map = " { \""..luaname.."\", &wxluatype_"..MakeClassVar(member.DataType)..", &"..member.Name..", NULL },\n", Condition = fullcondition } |
From: John L. <jr...@us...> - 2009-10-12 01:50:13
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv32577/wxLua/bindings/wxwidgets Modified Files: wxcore_gdi.i Log Message: Allow %define_object/pointer to be used outside of a class %define_object wxPoint wxDefaultPosition Index: wxcore_gdi.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxcore_gdi.i,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** wxcore_gdi.i 1 Oct 2009 04:21:01 -0000 1.9 --- wxcore_gdi.i 12 Oct 2009 01:50:05 -0000 1.10 *************** *** 17,22 **** %define wxDefaultCoord %class %delete wxPoint ! %define_object wxDefaultPosition wxPoint(int x = 0, int y = 0) --- 17,24 ---- %define wxDefaultCoord + %define_object wxPoint wxDefaultPosition + %class %delete wxPoint ! //%define_object wxDefaultPosition wxPoint(int x = 0, int y = 0) |
From: John L. <jr...@us...> - 2009-10-05 02:51:42
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10796/wxLua/modules/wxlua/src Modified Files: wxlbind.cpp wxlcallb.cpp wxlstate.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: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.184 retrieving revision 1.185 diff -C2 -d -r1.184 -r1.185 *** wxlstate.cpp 1 Oct 2009 04:21:02 -0000 1.184 --- wxlstate.cpp 5 Oct 2009 02:51:29 -0000 1.185 *************** *** 26,49 **** //#include "wxluadebug/include/wxldebug.h" // for debugging only ! const char* wxlua_lreg_types_key = "wxLua metatable class types"; ! const char* wxlua_lreg_refs_key = "wxLua Lua object refs"; ! const char* wxlua_lreg_debug_refs_key = "wxLuaDebugData refs"; ! const char* wxlua_lreg_classes_key = "wxLuaBindClass structs"; ! const char* wxlua_lreg_derivedmethods_key = "wxLua derived class methods"; const char* wxlua_lreg_wxluastate_key = "wxLuaState"; ! const char* wxlua_lreg_wxluabindings_key = "wxLuaBindings"; const char* wxlua_lreg_weakobjects_key = "wxLua objects pushed"; const char* wxlua_lreg_gcobjects_key = "wxLua gc objects to delete"; const char* wxlua_lreg_evtcallbacks_key = "wxLuaEventCallbacks"; const char* wxlua_lreg_windestroycallbacks_key = "wxLuaWinDestoyCallbacks"; const char* wxlua_lreg_topwindows_key = "wxLua top level wxWindows"; - const char* wxlua_lreg_callbaseclassfunc_key = "wxLua CallBaseClassFunc"; const char* wxlua_lreg_wxeventtype_key = "wxLua wxEventType"; ! const char* wxlua_lreg_wxluastatedata_key = "wxLuaStateData"; ! const char* wxlua_lreg_regtable_key = "wxLua LUA_REGISTRYINDEX tables"; const char* wxlua_metatable_type_key = "wxLua metatable class type"; const char* wxlua_metatable_wxluabindclass_key = "wxLua metatable wxLuaBindClass"; wxLuaState wxNullLuaState(false); --- 26,54 ---- //#include "wxluadebug/include/wxldebug.h" // for debugging only ! const char* wxlua_lreg_regtable_key = "wxLua LUA_REGISTRYINDEX tables"; ! const char* wxlua_lreg_wxluastate_key = "wxLuaState"; ! const char* wxlua_lreg_wxluastatedata_key = "wxLuaStateData"; ! ! const char* wxlua_lreg_wxluabindings_key = "wxLuaBindings installed"; ! const char* wxlua_lreg_classes_key = "wxLuaBindClass structs installed"; ! const char* wxlua_lreg_types_key = "wxLua metatable class types"; ! const char* wxlua_lreg_weakobjects_key = "wxLua objects pushed"; const char* wxlua_lreg_gcobjects_key = "wxLua gc objects to delete"; + const char* wxlua_lreg_derivedmethods_key = "wxLua derived class methods"; const char* wxlua_lreg_evtcallbacks_key = "wxLuaEventCallbacks"; const char* wxlua_lreg_windestroycallbacks_key = "wxLuaWinDestoyCallbacks"; const char* wxlua_lreg_topwindows_key = "wxLua top level wxWindows"; const char* wxlua_lreg_wxeventtype_key = "wxLua wxEventType"; ! const char* wxlua_lreg_callbaseclassfunc_key = "wxLua CallBaseClassFunc"; ! ! const char* wxlua_lreg_refs_key = "wxLua Lua object refs"; ! const char* wxlua_lreg_debug_refs_key = "wxLuaDebugData refs"; const char* wxlua_metatable_type_key = "wxLua metatable class type"; const char* wxlua_metatable_wxluabindclass_key = "wxLua metatable wxLuaBindClass"; + wxLuaState wxNullLuaState(false); Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.125 retrieving revision 1.126 diff -C2 -d -r1.125 -r1.126 *** wxlbind.cpp 1 Oct 2009 04:21:02 -0000 1.125 --- wxlbind.cpp 5 Oct 2009 02:51:29 -0000 1.126 *************** *** 52,55 **** --- 52,57 ---- int* p_wxluatype_wxEvent = &wxluatype_TUNKNOWN; int* p_wxluatype_wxWindow = &wxluatype_TUNKNOWN; + int* p_wxluatype_wxScrollEvent = &wxluatype_TUNKNOWN; + int* p_wxluatype_wxSpinEvent = &wxluatype_TUNKNOWN; int* p_wxluatype_wxString = &wxluatype_TUNKNOWN; int* p_wxluatype_wxArrayString = &wxluatype_TUNKNOWN; Index: wxlcallb.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlcallb.cpp,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** wxlcallb.cpp 25 Sep 2009 18:47:58 -0000 1.60 --- wxlcallb.cpp 5 Oct 2009 02:51:29 -0000 1.61 *************** *** 85,89 **** void wxLuaEventCallback::ClearwxLuaState() { ! m_wxlState.UnRef(); } --- 85,90 ---- void wxLuaEventCallback::ClearwxLuaState() { ! if (m_wxlState.Ok()) ! m_wxlState.UnRef(); } *************** *** 91,98 **** { return wxString::Format(wxT("%s(%d) -> wxLuaEventCallback(%p, ids %d, %d)|wxEvtHandler(%p) -> %s : %s"), ! lua2wx(m_wxlBindEvent ? m_wxlBindEvent->name : "?").c_str(), (int)GetEventType(), this, m_id, m_last_id, ! m_evtHandler, m_evtHandler->GetClassInfo()->GetClassName(), ! m_wxlState.GetwxLuaTypeName(*m_wxlBindEvent->wxluatype).c_str()); } --- 92,101 ---- { return wxString::Format(wxT("%s(%d) -> wxLuaEventCallback(%p, ids %d, %d)|wxEvtHandler(%p) -> %s : %s"), ! lua2wx(m_wxlBindEvent ? m_wxlBindEvent->name : "?NULL?").c_str(), ! (int)GetEventType(), this, m_id, m_last_id, ! m_evtHandler, ! m_evtHandler ? m_evtHandler->GetClassInfo()->GetClassName() : wxT("?NULL?"), ! m_wxlState.GetwxLuaTypeName(m_wxlBindEvent ? *m_wxlBindEvent->wxluatype : WXLUA_TUNKNOWN).c_str()); } *************** *** 106,116 **** wxCHECK_RET(theCallback != NULL, wxT("Invalid wxLuaEventCallback in wxEvent user data")); ! // Not an error if !Ok(), the wxLuaState is cleared during shutdown or after a destroy event. ! wxLuaState wxlState(theCallback->GetwxLuaState()); ! if (wxlState.Ok()) { ! wxlState.SetInEventType(evtType); ! theCallback->OnEvent(&event); ! wxlState.SetInEventType(wxEVT_NULL); } --- 109,122 ---- wxCHECK_RET(theCallback != NULL, wxT("Invalid wxLuaEventCallback in wxEvent user data")); ! if (theCallback != NULL) { ! // Not an error if !Ok(), the wxLuaState is cleared during shutdown or after a destroy event. ! wxLuaState wxlState(theCallback->GetwxLuaState()); ! if (wxlState.Ok()) ! { ! wxlState.SetInEventType(evtType); ! theCallback->OnEvent(&event); ! wxlState.SetInEventType(wxEVT_NULL); ! } } *************** *** 142,151 **** // wxEVT_SCROLL_LINEUP, wxEVT_SCROLL_LINEDOWN, wxEVT_SCROLL_THUMBTRACK ! if ((strcmp(m_wxlBindEvent->name, "wxScrollEvent") == 0) && ! (event->GetClassInfo()->GetClassName() == wxString(wxT("wxSpinEvent")))) { ! const wxLuaBindClass *wxlClass = wxlState.GetBindClass("wxSpinEvent"); ! if (wxlClass != NULL) ! event_wxl_type = *wxlClass->wxluatype; else event_wxl_type = *p_wxluatype_wxEvent; // get the generic wxluatype_wxEvent --- 148,157 ---- // wxEVT_SCROLL_LINEUP, wxEVT_SCROLL_LINEDOWN, wxEVT_SCROLL_THUMBTRACK ! //if ((strcmp(m_wxlBindEvent->name, "wxScrollEvent") == 0) && ! if ((*m_wxlBindEvent->wxluatype == *p_wxluatype_wxScrollEvent) && ! (wxStrcmp(event->GetClassInfo()->GetClassName(), wxT("wxSpinEvent")) == 0)) { ! if (*p_wxluatype_wxEvent != WXLUA_TUNKNOWN) ! event_wxl_type = *p_wxluatype_wxSpinEvent; else event_wxl_type = *p_wxluatype_wxEvent; // get the generic wxluatype_wxEvent |
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) { |
From: John L. <jr...@us...> - 2009-10-05 02:51:41
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/include In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10796/wxLua/modules/wxluadebug/include Modified Files: wxldebug.h wxlstack.h 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: wxldebug.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/wxldebug.h,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** wxldebug.h 22 Dec 2007 06:07:16 -0000 1.50 --- wxldebug.h 5 Oct 2009 02:51:29 -0000 1.51 *************** *** 138,143 **** // table then add a reference to it in the references array int EnumerateStackEntry(const wxLuaState& wxlState, int stack_frame, wxArrayInt& references); ! // fill this with the name and value of items in a table at the given reference, ! // if the table has a sub table then add a reference to it to the references array int EnumerateTable(const wxLuaState& wxlState, int nRef, int nEntry, wxArrayInt& references); --- 138,145 ---- // table then add a reference to it in the references array int EnumerateStackEntry(const wxLuaState& wxlState, int stack_frame, wxArrayInt& references); ! // Fill this with the name and value of items in a table at the given reference ! // in the wxlua_lreg_debug_refs_key in the LUA_REGISTRYINDEX. ! // nRef may also be LUA_GLOBALSINDEX and LUA_REGISTRYINDEX. ! // If the table has a sub table then add a reference to it to the references array. int EnumerateTable(const wxLuaState& wxlState, int nRef, int nEntry, wxArrayInt& references); Index: wxlstack.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/wxlstack.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wxlstack.h 22 Dec 2007 06:07:16 -0000 1.18 --- wxlstack.h 5 Oct 2009 02:51:29 -0000 1.19 *************** *** 78,86 **** wxLuaDebugItem* GetDebugItem() { return m_parentDebugData.Item(m_item_idx); } ! int m_item_idx; ! int m_level; ! wxLuaDebugData m_parentDebugData; ! wxLuaDebugData m_childrenDebugData; ! wxTreeItemId m_treeId; }; --- 78,86 ---- wxLuaDebugItem* GetDebugItem() { return m_parentDebugData.Item(m_item_idx); } ! int m_item_idx; // this item # in m_parentDebugData ! int m_level; // depth into the Lua tables ! wxLuaDebugData m_parentDebugData; // ref of parent's data ! wxLuaDebugData m_childrenDebugData; // valid if this item has children, e.g. a table ! wxTreeItemId m_treeId; // valid if this item is in the treectrl, e.g. a table }; *************** *** 152,156 **** LIST_COL_KEY_TYPE, LIST_COL_VALUE_TYPE, ! LIST_COL_VALUE }; --- 152,158 ---- LIST_COL_KEY_TYPE, LIST_COL_VALUE_TYPE, ! LIST_COL_VALUE, ! ! LIST_COL__MAX }; *************** *** 168,172 **** virtual void EnumerateStackEntry(int nEntry); virtual void EnumerateTable(int nRef, int nEntry, long lc_item); - virtual void EnumerateGlobalData(long lc_item); // Fill the combobox with the stack entries in the debug data and select --- 170,173 ---- |
From: John L. <jr...@us...> - 2009-10-05 02:51:41
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10796/wxLua/modules/wxlua/include Modified Files: wxlbind.h wxlcallb.h wxlstate.h 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: wxlcallb.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlcallb.h,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** wxlcallb.h 19 May 2009 03:20:53 -0000 1.30 --- wxlcallb.h 5 Oct 2009 02:51:29 -0000 1.31 *************** *** 66,70 **** // Get a human readable string about this callback. // "wxEVT_XXX(evt#) -> wxLuaEventCallback(&callback, ids %d %d)|wxEvtHandler(&evthandler) -> wxEvtHandlerClassName" ! wxString GetInfo() const; // Get a human readable string // Central event handler that calls OnEvent() for the actual --- 66,70 ---- // Get a human readable string about this callback. // "wxEVT_XXX(evt#) -> wxLuaEventCallback(&callback, ids %d %d)|wxEvtHandler(&evthandler) -> wxEvtHandlerClassName" ! wxString GetInfo() const; // Central event handler that calls OnEvent() for the actual Index: wxlbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlbind.h,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -d -r1.90 -r1.91 *** wxlbind.h 1 Oct 2009 04:21:01 -0000 1.90 --- wxlbind.h 5 Oct 2009 02:51:29 -0000 1.91 *************** *** 109,112 **** --- 109,114 ---- extern WXDLLIMPEXP_DATA_WXLUA(int*) p_wxluatype_wxEvent; // wxLua type for wxEvent extern WXDLLIMPEXP_DATA_WXLUA(int*) p_wxluatype_wxWindow; // wxLua type for wxWindow + extern WXDLLIMPEXP_DATA_WXLUA(int*) p_wxluatype_wxScrollEvent; // wxLua type for wxScrollEvent - see wxLuaEventCallback::OnEvent + extern WXDLLIMPEXP_DATA_WXLUA(int*) p_wxluatype_wxSpinEvent; // wxLua type for wxSpinEvent - see wxLuaEventCallback::OnEvent extern WXDLLIMPEXP_DATA_WXLUA(int*) p_wxluatype_wxString; // wxLua type for wxString extern WXDLLIMPEXP_DATA_WXLUA(int*) p_wxluatype_wxArrayString; // wxLua type for wxArrayString Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.126 retrieving revision 1.127 diff -C2 -d -r1.126 -r1.127 *** wxlstate.h 1 Oct 2009 04:21:01 -0000 1.126 --- wxlstate.h 5 Oct 2009 02:51:29 -0000 1.127 *************** *** 97,100 **** --- 97,125 ---- // they're not used, just the memory address. + // The key in the LUA_REGISTRYINDEX table that is a weak keyed table of + // the tables wxLua pushed into the registry with their keys as values. + // This is used by the wxLuaDebugData to know if the table is one of the wxLua + // registry tables for better wxLuaStackDialog performance. + // LUA_REGISTRYINDEX[&wxlua_lreg_regtable_key][weak {wxlua_lreg_XXX_key table}] = + // lightuserdata(&wxlua_lreg_XXX_key) + extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_regtable_key; + + // The key in the LUA_REGISTRYINDEX table whose value is a lightuserdata + // of a wxLuaState for this lua_State. + // LUA_REGISTRYINDEX[&wxlua_lreg_wxluastate_key] = lightuserdata(&wxLuaState) + extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxluastate_key; + // The key in the LUA_REGISTRYINDEX table that has a wxLuaStateData class + // lightuserdata value for the wxLuaState. + // LUA_REGISTRYINDEX[&wxlua_lreg_wxluastatedata_key] = lightuserdata(&wxLuaStateData) + extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxluastatedata_key; + + // The key in the LUA_REGISTRYINDEX table that is a table of lightuserdata + // wxLuaBindings and the ref to the Lua table they were installed into. + // LUA_REGISTRYINDEX[&wxlua_lreg_wxluabindings_key] = {lightuserdata(&wxLuaBinding) = wxlua_lreg_refs_key ref#, ...} + extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxluabindings_key; + // The key in the LUA_REGISTRYINDEX table that is a lookup table of string + // C++ classname keys and lightuserdata pointers to the associated wxLuaBindClass struct. + // LUA_REGISTRYINDEX[&wxlua_lreg_debug_refs_key][wxLuaBindClass.name] = lightuserdata(&wxLuaBindClass) + extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_classes_key; // The key in the LUA_REGISTRYINDEX table that is a numerically keyed table indexed // on the wxLua types where each item is a userdata metatable for a C++ class. *************** *** 105,135 **** // LUA_REGISTRYINDEX[&wxlua_lreg_types_key][wxLua type number] = { metatable for a C++ class } extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_types_key; ! // The key in the LUA_REGISTRYINDEX table that is a numerically keyed table ! // with references to Lua objects we want to keep a handle to. The object could be ! // anything, a table, function, number, string, userdata... ! // LUA_REGISTRYINDEX[&wxlua_lreg_refs_key][ref number] = Lua object ! extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_refs_key; ! // The key in the LUA_REGISTRYINDEX table that is a numerically keyed table ! // with references to objects the wxLuaDebugData wants to keep a handle to by ! // storing their value for lookup. It is used only for the wxLuaDebugData. ! // LUA_REGISTRYINDEX[&wxlua_lreg_debug_refs_key][ref number] = Lua object ! extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_debug_refs_key; ! // The key that in the LUA_REGISTRYINDEX table that is a lookup table of string ! // C++ classname keys and lightuserdata pointers to the associated wxLuaBindClass struct. ! // LUA_REGISTRYINDEX[&wxlua_lreg_debug_refs_key][wxLuaBindClass.name] = lightuserdata(&wxLuaBindClass) ! extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_classes_key; ! // The key in the LUA_REGISTRYINDEX table that is a table ! // of Lua objects/functions assigned to wxLua userdata programatically in Lua. ! // LUA_REGISTRYINDEX[&wxlua_lreg_derivedmethods_key][lightuserdata(obj_ptr)] = ! // {["derived func/value name"] = wxLuaObject(Lua function/value), ...} ! extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_derivedmethods_key; ! // The key in the LUA_REGISTRYINDEX table who's value is a lightuserdata ! // of the wxLuaState for this lua_State. ! // LUA_REGISTRYINDEX[&wxlua_lreg_wxluastate_key] = lightuserdata(&wxLuaState) ! extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxluastate_key; ! // The key in the LUA_REGISTRYINDEX table that is a table of lightuserdata ! // wxLuaBindings and the ref to the Lua table they were installed into. ! // LUA_REGISTRYINDEX[&wxlua_lreg_wxluabindings_key] = {lightuserdata(&wxLuaBinding) = wxlua_lreg_refs_key ref#, ...} ! extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxluabindings_key; // The key in the LUA_REGISTRYINDEX table that is a table of all // objects that we've pushed into Lua using wxluaT_pushuserdatatype(). --- 130,134 ---- // LUA_REGISTRYINDEX[&wxlua_lreg_types_key][wxLua type number] = { metatable for a C++ class } extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_types_key; ! // The key in the LUA_REGISTRYINDEX table that is a table of all // objects that we've pushed into Lua using wxluaT_pushuserdatatype(). *************** *** 144,147 **** --- 143,152 ---- // integer wxLua type extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_gcobjects_key; + + // The key in the LUA_REGISTRYINDEX table that is a table + // of Lua objects/functions assigned to wxLua userdata programatically in Lua. + // LUA_REGISTRYINDEX[&wxlua_lreg_derivedmethods_key][lightuserdata(obj_ptr)] = + // {["derived func/value name"] = wxLuaObject(Lua function/value), ...} + extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_derivedmethods_key; // The key in the LUA_REGISTRYINDEX table that is a table of all // wxLuaEventCallbacks that we've created. *************** *** 167,185 **** // LUA_REGISTRYINDEX[&wxlua_lreg_wxeventtype_key] = wxEventType (wxEVT_NULL) extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxeventtype_key; - // The key in the LUA_REGISTRYINDEX table that has a wxLuaStateData class - // lightuserdata value for the wxLuaState. - // LUA_REGISTRYINDEX[&wxlua_lreg_wxluastatedata_key] = lightuserdata(&wxLuaStateData) - extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxluastatedata_key; - // The key in the LUA_REGISTRYINDEX table that is a weak keyed table of - // the tables wxLua pushed into the registry with their keys as values. - // This is used by the wxLuaDebugData to know if the table is one of the wxLua - // registry tables for better wxLuaStackDialog performance. - // LUA_REGISTRYINDEX[&wxlua_lreg_regtable_key][weak {wxlua_lreg_XXX_key table}] = - // lightuserdata(&wxlua_lreg_XXX_key) - extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_regtable_key; ! // Light userdata used as keys in the metatables created for the class userdata objects. ! // Note that even though these keys have values, they're not used, just the memory address. // wxLua userdata metatable structure: // { --- 172,188 ---- // LUA_REGISTRYINDEX[&wxlua_lreg_wxeventtype_key] = wxEventType (wxEVT_NULL) extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxeventtype_key; ! // The key in the LUA_REGISTRYINDEX table that is a numerically keyed table ! // with references to Lua objects we want to keep a handle to. The object could be ! // anything, a table, function, number, string, userdata... ! // LUA_REGISTRYINDEX[&wxlua_lreg_refs_key][ref number] = Lua object ! extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_refs_key; ! // The key in the LUA_REGISTRYINDEX table that is a numerically keyed table ! // with references to objects the wxLuaDebugData wants to keep a handle to by ! // storing their value for lookup. It is used only for the wxLuaDebugData. ! // LUA_REGISTRYINDEX[&wxlua_lreg_debug_refs_key][ref number] = Lua object ! extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_debug_refs_key; + // ---------------------------------------------------------------------------- // wxLua userdata metatable structure: // { *************** *** 192,195 **** --- 195,201 ---- // } + // Light userdata used as keys in the metatables created for the class userdata objects. + // Note that even though these keys have values, they're not used, just the memory address. + // The key of a metatable used for wxLua userdata that is the wxLua type number in the // wxlua_lreg_types_key table this metatable is for. |