lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

What version of Lua are you using?

This works for me in 4.1 work 3 :


lua_pushstring(L, "settable");
lua_pushcfunction(L, global_settable);
lua_settable(L, -3);

lua_seteventtable(L, LUA_GLOBALSINDEX);

Love, Light and Peace,
- Peter Loveday
eyeon Software

----- Original Message ----- 
From: "Chris Percival" <>
To: "Multiple recipients of list" <>
Sent: Wednesday, February 06, 2002 4:15 AM
Subject: Tag methods

> Ok I give up, can someone give me a clear example of how to set a tag method
> for 'setglobal' for example?
> For example something like this:
> lua_pushnumber(L, 1);
> lua_setglobal(L, "Batch");
> int tag = lua_newtag(L);
> lua_pushcfunction(L, SetglobalHander);
> lua_settagmethod(L, tag, "setglobal");
> This doesn't work, I guess I am missing something..  I know I have raised a
> couple of issues regarding this over the last week or so, but I just can't
> get anything going, and am getting frustrated.  There seems to be a huge
> lack of examples around even in the archives.  All the documentation around
> Lua is very terse, and doesn't seem to be geared to Lua newbies like me. :(
> Chris Percival
> Software Engineer
> Interaxis Computing Ltd.
> DDI:  +44 (0)1249 700072