[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Read only tables.
- From: Sam Roberts <vieuxtech@...>
- Date: Wed, 17 Jun 2009 10:12:22 -0700
On Wed, Jun 17, 2009 at 9:37 AM, Imagine
Programming<contact@imagine-programming.com> wrote:
> I've noticed, it doesn't make it read only again.
> Would I have to first set the metatable, and then only change
> the index every time? from nil to ronly() ?
You have to not store the key/value pair in the actual table, you have
to store it in some other table, so all reads and writes go through
__index and __newindex.
Or just don't make it read-only.
What are you trying to achieve?
Cheers,
Sam