|
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 stuff.
That's a good point, and a good idea. Jason