[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Function tag on tables?
- From: "J. Perkins" <jason379com@...>
- Date: Tue, 8 May 2001 07:59:42 -0700 (PDT)
I'm trying to catch the 'function' tag for tables,
like so:
int callConstructor(lua_State* L);
lua_pushcfunction(L, callConstructor);
lua_settagmethod(L, LUA_TTABLE, "function");
Now according to the docs, when the tag handler gets
called, there should be a table on the stack
containing the arguments to the function, and the
first entry should the name of the function that was
called. However, when I do this in Lua
someTbl = { }
someTbl()
...the function tag handler gets called with a table
on the stack, but the table is *empty* (that is,
lua_getn(L,1) == 0). Am I misinterpreting the docs?
Jason
379
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/