lua-users home
lua-l archive

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


Ah, I see.  Thanks!  That's fixed it.

On Wed, Apr 15, 2015 at 3:48 PM, 张睿 <zrui16@hotmail.com> wrote:
> 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).