Good catch SquidDev.
__index = function( t, k )
return rawget( t, k ) or getmetatable( t ).__super[ k ]
end,
That eliminates the ArrayIndexOutOfBounds problem, but the Object class is still becoming "Window".
Oh, and I get an error on line 6:
mt.inherits[ #mt.inherits + 1 ] = object.class()
Which indicates object.class is nil (specifically, attempt to call nil).
@Creator: I do declare this. Env fun:
__newindex = function( t, k, v )
if type( v ) == "function" then
local env = getfenv( v )
env.this, env.super = t, getmetatable( t ).__super
end
rawset( t, k, v )
end,
Edited by KingofGamesYami, 28 December 2015 - 03:19 PM.