lua-users home
lua-l archive

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


I'm having some trouble with the settable event in Lua 5.0 (alpha).

In Lua 4.0 I do:

x = settag({v = 0}, newtag())
settagmethod(tag(x), "settable", function() print("settable") end)
x.v = 10

It works fine printing "settable".
But in Lua 5.0 (alpha) I do:

x = {v = 0}
setmetatable(x, {__settable = function() print("settable") end})
x.v = 10

It doesn't print nothing.

I'm doing something wrong or is it a bug?

--
Milano Carvalho


_________________________________________________________________
Tenha você também um MSN Hotmail, o maior webmail do mundo: http://www.hotmail.com/br