View Single Post
10/24/16, 07:53 AM   #8
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,580
Originally Posted by Werewolf Finds Dragon View Post
I was looking for an implementation of this, basically:

Code:
local addonFunction = debug.getinfo(2).func
local addonObjectName = debug.getupvalues(addonFunction, 1)
local addonObject = _G[addonObjectName]
local addonObjectValue = addonobject.myValue
print(addonObjectValue)
But it doesn't look like any implementation of that has made its way into ESO. Sorry to waste everyone's time with this.
Using debug functions in your regular code screams bad design.
Why not just pass the value to the function, or make your library return an instance (see ZO_Object) with your addonObject stored?
  Reply With Quote