lua-users home
lua-l archive

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


Ops, there was a typo:

> mmt = {}
> mmt.__index = mmt
> function mmt.__call(tab,...)
>    print("called: ",tab,unpack(arg))
> end
> 
> mt = {}
> mt.__index = mt
> setmetatable(mt,mmt)
> 
> tab = {}
> setmetatable(tab,mt)