On Thu, Dec 17, 2009 at 8:05 AM, Dzmitry Hancharou <red1...@tut.by> wrote: > Unfortunately, it does not work. Table of mywxlib is not placed in the stack. > >From wxlstate.h: > // Register a single wxLuaBinding, returns true on success. Nothing is > // left on the stack. > bool RegisterBinding(wxLuaBinding* binding); > ... > > How to put in lua-stack mywxlib? Maybe I misconfigured mywxlib_rules.lua? >
That's why I suggested to use wxLuaBinding::RegisterBinding(cont wxLuaState& wxlState) since it does leave the table on the stack. The wxLuaState::RegisterBinding(wxLuaBinding* binding) does not since it's supposed to be a convenience function for C++ programmers who are adding bindings one by one and I assumed they they'd just have to pop it since I can't think of anything they would want to do with it. By the way, there is a table in the LUA_REGISTRYINDEX of the installed bindings, the table key is "wxlua_lreg_wxluabindings_key" and you can see its usage in wxLuaBinding::RegisterBinding() in wxlbind.cpp should you want to query or figure out what was installed at any point. Regards, John ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users