Lua Scope for Corona SDK -


i wondering how might able access obj.isactive outside function such "object:setactive()". pull object table need multiple instances of isactive property individual objects. trying figure out way so.

object

object = {};  objectmeta = {__index = object};  function object.new(args)     obj = {};     obj.isactive= false;     return setmetatable(obj,objectmeta); end  function object:setactive()     --??????????????????????????     --self.isactive = nil end return object; 

for metatables, can use self follows:

function object:setactive()     self.isactive = true end 

here sscce code: http://eval.in/25148


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

qt - Errors in generated MOC files for QT5 from cmake -