lua-users home
lua-l archive

Re: When does __index metamethod get called?

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


On 3/16/06, Jerome Vuarand <jerome.vuarand@ubisoft.com> wrote:
__newindex is used for any write to he table.
__index is a getter, __newindex is the setter.
Doub.


Well, it would be nice if __newindex was called for any write but that doesn't seem to be the case. That's actually how I thought it would work at first since I couldn't find a __setindex metamethod.

--
// Chris



AltStyle によって変換されたページ (->オリジナル) /