diff --git a/src/class.lua b/src/class.lua index 0f211fa..f8583d8 100644 --- a/src/class.lua +++ b/src/class.lua @@ -99,10 +99,10 @@ function module.init(shared) local with = value.wfunc; local tstore = value.store; local rawKey = value.key; - local set = store[rawKey]; + local set = tstore[rawKey]; if set or (rawKey:match(",") and with) then if with then - set = with(item,tstore,set,value.key); + set = with(tstore,set,value.key,item); end setProperty(item,index,set,ClassName); else @@ -120,7 +120,7 @@ function module.init(shared) newValue = from[newValue]; end if with then - newValue = with(item,tstore,newValue,key); + newValue = with(tstore,newValue,key,item); end if tween then if not advancedTween then diff --git a/src/init.lua b/src/init.lua index a8c770c..40a6889 100644 --- a/src/init.lua +++ b/src/init.lua @@ -61,4 +61,8 @@ function module.init(id) return this; end +function module.uninit(id) + idSpace[id] = nil; +end + return module;