View Single Post
01-07-19, 07:55 AM   #9
FranekW
A Cyclonian
 
FranekW's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 44
Originally Posted by myrroddin View Post
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.
I understand. I've changed variable to local. Before I thought this object would need to be in global scope.

I really appreciate your comments because those couple of posts (this one here and others answering my questions in other threads) let me figure out how things work. There's still plenty to learn but I believe I have a pretty good understanding of basic stuff

Last edited by FranekW : 01-07-19 at 07:59 AM.
  Reply With Quote