lua-users home
lua-l archive

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


On Thursday 11 December 2003 08:22, Florian Berger wrote:
> Hi.
>
> Is there a simple and efficient way to check if a table has changed? By
> using metatables I'm able to catch some modifications but not all of them.

You could use a proxy table with a __newindex which makes modifications to the 
actual table and sets a 'modified' flag. Since the proxy table stays empty, 
__newindex is always called.

 -- Jamie Webb

There are only 10 types of people in this world:
those who understand binary, and those who don't.