Original Post
I have a proxy table that exists in lua (it is a proxy for a vector that exists in C). The proxy table has the appropriate index/newindex metamethods so that it will read/write to the vector in C. Now, I would like for the table to 'feel' like a normal lua table, for example, it would be nice if the user could still use the the table library (table.insert(), ect...). The problem is, since the proxy table is empty, when the table library uses #t to get the table size, it is always 0.
My question - is there anyway to override the #t method, or is there some other clever way to get the table library to work with my proxy table?
Thanks
My question - is there anyway to override the #t method, or is there some other clever way to get the table library to work with my proxy table?
Thanks