lua-users home
lua-l archive

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

I've got this table I want to protect (a lua script as plugin) and that's coming along quite nice.
function ronly(t,i) error("Protected table!",4) end
function ronly_set() setmetatable(__tMemory,{__index=_G,__newindex=ronly});end
Now my question is, how can I change it back and forth from readonly to editable?
Thanks, Bas gr.