[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: index/newindex on a table
- From: "Peter Shook" <pshook@...>
- Date: Fri, 4 Oct 2002 17:43:50 -0400
>>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?
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.
- Peter Shook