Great thread - Im learning something today
BTW - Is there any advantage/disadvantage to using an approach as below?
Code:
local function somePrivateFunction()
end
local function somePrivateFunction2()
end
MyAddon = {
somePublicVariable = value,
somePublicVariable2 = value
};
MyAddon.somePublicFunction = function()
-- may use a local function in here, or not
end
MyAddon.somePublicFunction2 = function()
-- may use a local function in here, or not
end
Also I am not sure whats the significance of using "function MyAddOn:AnotherFunc()" as opposed to "MyAddon.somePublicFunction2 = function()" , I will read the lua docs again, but if anyone can explain it to me in simple terms Id appreciate it