I was thinking about '__index' as well, but as far as I can figure this would only help with making readable properties, not writable onesOriginally Posted by jdarling
How would using '__newindex' help with emulating properties? This is only called if one is adding a new key + value to a table, not for pre-existing keys...
I would be interested in how you got the '__newindex' working for this sort of thing
Also I have no clue as to if it is even possible to protect the existing 'class methods' created in the table from being accidently overwritten by a lua script using the table and assigning a value to that key...
Any thoughts on that one?
cheers,
Paul.
Bookmarks