Originally Posted by FranekW
Do you always define the main addon object as local?
|
I do, yes. Otherwise the object is in the global name space, which is bad more often than getting away with it, and it is never good.
The name
HiddenFrames is incredibly generic, and 99.99% likely to be overwritten with code that isn't yours. Even if you did have a totally unique name, making variables local is almost always better.
With Ace3, you can use AceAddon's
GetAddon API to return the object if it is in another file within the same addon, meaning if the primary file defines the object as local, you can still reference it in another file.