View Single Post
01-07-19, 05:46 AM   #13
FranekW
A Cyclonian
 
FranekW's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 44
First, I understand now I should have started a new topic. I feel like I stole it from OP! I did not realise asking about one character in a short line would elaborate to a couple of major answers. It would be much better to move posts answered my questions to a new thread.

Second, thanks for clarification. Now I understand why lua files in each addon starts with one of those lines. Still, people create addons using different ways and without clarifications here it would be much more difficult to me to understand it. For instance, Core.lua in Altoholic begins like this:

Lua Code:
  1. local addonName = ...
  2.  
  3. _G[addonName] = LibStub("AceAddon-3.0"):NewAddon(addonName, "AceConsole-3.0", "AceEvent-3.0", "AceComm-3.0", "AceSerializer-3.0", "AceTimer-3.0", "LibMVC-1.0")

I guess the idea is to use _G to share addon table between files. My understanding is that "sharing" would also be accomplished if Author wrote this as a first line:

Lua Code:
  1. local Altoholic = LibStub("AceAddon-3.0"):NewAddon(addonName, "AceConsole-3.0", "AceEvent-3.0", "AceComm-3.0", "AceSerializer-3.0", "AceTimer-3.0", "LibMVC-1.0")

and I would not know that without your help, which I am really grateful for
  Reply With Quote