View Single Post
01-31-12, 02:55 PM   #18
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
Originally Posted by Grimsin View Post
Should this be at the top of each of my files?

local addonName, addon = ...
_G[addonName] = addon

or just my first file?
I usually have a core file in a UI addon that is loaded first out of all the others that handles all the basic needs, typicly global registration of the addon table, API for registering modules, event callback system, and/or any functions/structures I want globally available to the entire addon.

It doesn't hurt to put that line in all of your files, but it's completely redundant.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 01-31-12 at 02:57 PM.
  Reply With Quote