On Dec 24, 2007 9:44 AM, Andre <[EMAIL PROTECTED]> wrote: > Andre <[EMAIL PROTECTED]> writes: > > > > > Current version > install a fresh copy > got these errors > > canlua.cpp > > 'PushUserDataType' : is not a member of 'wxLuaState' > 's_wxluatag_wxlCanObj' : undeclared identifier > > even doing a clean sometime does not work >
I have "updated" the nomenclature for what wxLua calls the C++ class objects that wxLua pushes into Lua. Originally they were called "tags" (hence the functions PushUserTag(...), newtag(), gettag(), settag()...) and that made sense in Lua 4 since that's what Lua also called the functions to work on Lua objects, in our case userdata. Lua 5 got rid of the idea of "tags" and now uses metatables. The Lua 4 functions gettag() and settag() are gone. wxLua now calls the C++ objects that are pushed into Lua using userdata, "wxLua types". I think this is more generic and there are wxLua types that map to the lua_type()s LUA_TXXX as WXLUA_TXXX and are negative, the wxLua types that are positive are C/C++ structs and classes with their number generated at runtime. Numbers are used for speed since using the string class/struct name is slower since Lua has to hash every string to compare it. How this affects you... 1) wxLuaState::PushUserTag() is removed and PushUserDataType() is now wxluaT_PushUserDataType() which takes the parameters that PushUserTag() did. These two functions were very similar and have been combined. 2) The global integer "tags" or now wxLua types were named int s_wxluatag_XXX and are now named g_wxluatype_XXX since they're not static anymore and are the types. 3)... ? Hopefully not much else unless your C++ code is fairly advanced. The bottom line, the wxLua functions have been renamed or reworked to match the Lua functions so that people familiar with Lua can more easily understand wxLua and people who become familar with wxLua will also be learning Lua. I hope this doesn't ruin anyone's holiday fun! John ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users