[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: userdata event tables?
- From: "J. Perkins" <jason@<a href="/cgi-bin/echo.cgi?379.com">...</a>>
- Date: Fri, 01 Feb 2002 16:40:37 -0500
Diego Nehab wrote:
I don't know if it is a feature or not, but I had the same "problem". In
fact, one can argue that the index method makes no sense for userdata
objects, since the vm has no way of telling wether the entry for the key is
nil or not :-). Try setting gettable instead.
Last time I used "gettable" when I should have used "index", this
time it's "index" when I should be using "gettable". I think I'm
getting daft in my old age ;)
Also, it seems to me that userdata manipulation is now restricted to the C
side, to avoid improper use by client Lua applications fiddling with your C
That's a good point, and a good idea.