[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: When does __index metamethod get called?
- From: Jamie Webb <j@...>
- Date: Fri, 17 Mar 2006 12:03:45 +0000
On Thu, Mar 16, 2006 at 08:31:13PM -0500, Chris wrote:
> Thanks, that might work although the whole reason I want things like
> iteration to work is less for my sake and more for the people using my API.
You can get iteration back by redefining next and ipairs, e.g. to
check for __next and __ipairs metamethods before falling back to the
built-in versions.
-- Jamie Webb