[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Extra Lua table in a library registration
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 15 Aug 2006 09:43:36 -0300
> Is there some explanation why it fails?
You don't say *how* it fails but here is a guess: Don't you need a
lua_newtable() just before the keyboard and mouse loops?
// Store key constants in 'keybaord' table
lua_newtable(L);
...
lua_setglobal(L, 'keyboard');
// Store mouse button constants in 'mouse' table
lua_newtable(L);
...
lua_setglobal(L, 'mouse');
BTW, no need for this:
lua_settop(L, 0);