Originally Posted by Mikord
On the functions, yes it's better to create a "namespace" for your mod and define all publicly accessible functions/data as a part of it.
MyMod = {}
function MyMod.PubliclyAccessibleFunction(args...)
-or-
function MyMod:PubliclyAccessibleFunction(args...)
Event handlers however rarely need to be called outside of in response to an event and therefore can almost always by a completely local function like I demonstrated in the previous code.
|
I've noticed many authors use this approach now - what, exactly is bad about using global functions - or assigning functions into your Frame - or using entirely local functions?