It looks like you're new here. If you want to get involved, click one of these buttons!
function __addDisplayMethods(object) local mt = getmetatable(object) local oldIndex = mt.__index object.setFillColor = function(self,r,g,b,a) object:setColorTransform(r/255,g/255,b/255,a/255) end object.insert = function(self,thing) object:addChild(thing) end object.__index = function(self,key) print("I") end mt.__index = function(t, key) print("Ky = " .. key) if key == 'x' then return object:getX() else oldIndex(t, key) end end end |
Likes: Ozzan
Comments
make sure that inside your opening <> you have pre lang="lua" exactly like that.
Then in the closing <> you have /pre - no spaces around any of it!
evs