2009/6/17 <contact@imagine-programming.com>:
Van: Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>
> setmetatable(__tMemory).__newindex=nil
wouldn't that be:
getmetatable(__tMemory).__newindex=nil
oops, you're right, sorry.
Thank you for your help, another thing learnen about metatables.
With that solution, once some keys are added to the table, reseting
the __newindex to the ronly function won't be enough to make it
read-only again. __newindex is only called if the key is not in the
table.
__________ NOD32 4162 (20090617) Informatie __________
Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem.
http://www.nod32.nl