Quantcast ACE3 - reusing addon table from other addon - WoWInterface
Thread Tools Display Modes
Prev Previous Post   Next Post Next
01-28-18, 04:19 PM   #1
A Murloc Raider
Join Date: Aug 2012
Posts: 8
ACE3 - reusing addon table from other addon

I was wondering if it was possible to access an addon's addon-table from within a different addon.

So basically I have two addons (2nd addon depends on 1st addon):
(dont mind the names, I changed them to illustrate my problem better)

local addonName1, addonTable1 = ...
local addon1 = LibStub("AceAddon-3.0"):NewAddon(addonName1)

addonTable1 = { --bunch of data }
local addonName2, addonTable2 = ...
local addon1 = LibStub("AceAddon-3.0"):GetAddon("addon1", true)
if not addon1 then return end
local addon2 = addon1:NewModule(addonName2)
So how could I access addonTable1?
I could wrap the variable in a function and have it return that specific table to me in addon2, but I was wondering if there was a more clever way of doing this.
Perhaps ace3 provides a clever way?
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » ACE3 - reusing addon table from other addon

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off