Originally Posted by jlam
You should be able to write your own table class with its own iterators, though they will never be seamlessly dropped in place of normal tables.
|
I was going to do that but there are many helper functions I use which use pairs and ipairs so rather than try to avoid them I decided to add a "GetTable" method to my "proxy table" to get the "real table" that my proxy table communicates with, and then just pass the real table to these functions and pairs/ipairs.
That'll have to do for now. I've heard that 5.1 supports a metamethod for __next but I'd rather not have to always use next() for everything just for the sake of being safe.