[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Function tag on tables?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 8 May 2001 12:08:11 -0300 (EST)
>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.
No, the "function" tag method receives all arguments plus the value that
triggered the event, and the value comes first.
If you want all these to go into a table, define your tag method as vararg.
Try this:
someTbl = { }
print(someTbl)
settagmethod(tag(someTbl), "function", function (...) foreachi(arg,print) end)
someTbl(10,20)
--lhf