WoWInterface - View Single Post - Is there a way to find what version of Lua WoW is using?
View Single Post
12-25-18, 02:29 AM   #6
A Frostmaul Preserver
Mayron's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 261
Originally Posted by jlam View Post
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.
  Reply With Quote