lua-users home
lua-l archive

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


>>Try starting from the simplest example and build up. This is what I get:
>
>You output seems to be what I expected. What is wrong wiht it?
>The __index metamethod is called twice and the __newindex once.
>Since the __newindex metamethod does not set the value of XYZ,
>the __index metamethod is called a second time. Isn't that right?
>--lhf

Yes, I (Peter Shook) would say so.  :-)

I was trying to give a simple working example for Peter Loveday to compare with his code.  He never provided his code, so it is hard to say what's wrong.  I think his __newindex event handler must somehow be setting XYZ in the globals table.

Cheers,

- Peter Shook