Soo… in the Lua 5.2, there is a reference to a metamethod that can be called when using pairs on a metatable, however, when I actually do it, it no work. Any thoughts?
local Gui = {}
Gui.__index = Gui
Gui.__pairs = function(tbl)
return function(tbl, k)
local v
k,v = next(tbl, k)
if v and type(v) == "table" then
return k,v
end
end, tbl, nil
end
Look at these developers, making me have to rewrite their own functions
local specialpairs = function(tbl)
tbl.Object = nil
return function(tbl, k)
local v
k,v = next(tbl, k)
if v and type(v) == "table" then
return k,v
end
end, tbl, nil
end
Don’t know if they removed it or if it doesn’t support it. But I do know io.read() was removed because there’s already gui objects and io.read() is for the console (Vannila Lua).