WoWInterface - View Single Post - Finding Frames of other Addons and overwriting their position
View Single Post
06-22-19, 09:03 AM   #10
A Warpwood Thunder Caller
AddOn Compiler - Click to view compilations
Join Date: Jan 2010
Posts: 91
You are right, with BugSack I get an error:

1x Lybrial_Anchors\init.lua:90: Attempt to access forbidden object from code tainted by an AddOn
[C]: in function `GetName'
Lybrial_Anchors\init.lua:90: in function <Lybrial_Anchors\init.lua:78>
[C]: ?
...aceMasque\Libs\AceAddon-3.0\AceAddon-3.0-12.lua:70: in function <...aceMasque\Libs\AceAddon-3.0\AceAddon-3.0.lua:65>
...aceMasque\Libs\AceAddon-3.0\AceAddon-3.0-12.lua:527: in function `EnableAddon'
...aceMasque\Libs\AceAddon-3.0\AceAddon-3.0-12.lua:540: in function `EnableAddon'
...aceMasque\Libs\AceAddon-3.0\AceAddon-3.0-12.lua:620: in function <...aceMasque\Libs\AceAddon-3.0\AceAddon-3.0.lua:605>
[C]: in function `LoadAddOn'
FrameXML\UIParent.lua:446: in function `UIParentLoadAddOn'
FrameXML\UIParent.lua:565: in function `TimeManager_LoadUI'
FrameXML\UIParent.lua:1192: in function <FrameXML\UIParent.lua:1090>
And to be specific with what I want to achieve:

I have created WeakAuras which are anchored to the personal player resource nameplate.
So when the nameplate moves my WeakAuras move too. I want to do this for other AddOns
too. Raven for example supports this functionality out of the box. In the options frame I can
choose an anchor. Other AddOns like Grid2 or Hekili are not providing such a functionality.

That is why I wanted to implement a small Addon which picks up the frames of some predefined
AddOns and overwrites their anchor and position on the screen.

So for example I have the Grid2LayoutFrame which is the root frame of Grid2 and a child
of UIParent. So my Idea was to iterate over all frames of the UIParent to get the
Grid2LayoutFrame and to be able to modify its attributes.

Without iterating the children of UIParent and comparing the frame names I do not see
any possiblity to access the frames that I need.

Last edited by Lybrial : 06-22-19 at 09:07 AM.
  Reply With Quote