[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Constants in Lua 5
- From: "Bilyk, Alex" <ABilyk@...>
- Date: Thu, 16 Jan 2003 13:11:35 -0800
I used to create tables of constants in Lua 4 that after having been created and filled initially wouldn't allow changing existing or adding more values to such tables. As far as I can see from my tests with Lua 5 the meta-methods for table access are reduced to work with non-existent keys only.
Q1. Is this the intention of current design?
This effectively prevents me from intercepting attempts to change values of existing table keys by means similar to those of Lua 4.
Q2. What would be the recommended way of doing something like in Lua 5?
Q3. Is there any way to intercept simple table key access on 'get' and 'set' even on existing keys in Lua 5?