lua-users home
lua-l archive

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


on 7/10/03 6:17 AM, Wim Couwenberg at w.couwenberg@chello.nl wrote:

> That's right.  That changed from Lua 4 to Lua 5.  If you
> want to trap all index access you can use what is known as
> a "proxy": an empty table (that stays empty) while __index
> references the "actual" table.  By the way, __index will
> always be used/called for userdata (if present.)

I stumbled across needing to do this in order to catch __newindex
operations. The problem with this is that it then breaks things like table
iteration. Any advice on how to make this work?

Mark