View Single Post
01-28-10, 02:53 PM   #9
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,950
Very interesting. So where is the original information on this as I can't see it in the UI forums 3.3 changes.

What other values are in ... From the looks of it the first argument is the addon's name and the second one is its global table. Any other information in there ?

So say in my localization.enUS.lua file I currently do this.
<MyAddon>Translator_L["DescriptiveName"] = "Translated Text"

And then in my main addon I would usually do something like this.
local _L = <MyAddon>Translator_L;
print(_L["DescriptiveName"])


Instead I can now do this ?
AddonData = select(2,...)
AddonData.Translator_L["DescriptiveName"] = "Translated Text"

AddonData = select(2,...)
local _L = AddonData.Translator_L;

As long as each file in that addon you want to update and/or use the addons data will need to add that first line each time? So in essence they have created a global table for all addons that are loaded on the system ? Whether or not the values are used ?
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote