Why is it that the value of self.current_collection becomes nil in the load_collection function?
function init(self)
self.current_collection = "Main"
end
local function load_collection(self,proxy_id)
print(self.current_collection)
if self.current_collection ~= "Main" then
msg.post(self.current_collection, "unload")
end
msg.post(proxy_id, load)
self.current_collection = proxy_id
end
function on_message(self, message_id, message, sender)
if message_id == hash("load1") then
load_collection("#collection1")
elseif message_id == hash("proxy_loaded") then
msg.post(sender, "enable")
end
end