lua-users home
lua-l archive

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


m2.x = 2

--this operation (settable) is raw, i.e. no metamethod is called and a new key “x” is created in m2, not m2.variables.

If you want m2.variables.x to be changed, use a __newindex metamethod for m2 (again, not m2.variables).