Originally Posted by Werewolf Finds Dragon
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?