Quantcast
WoWInterface - View Single Post - Finding Frames of other Addons and overwriting their position
View Single Post
06-22-19, 07:22 AM   #4
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,494
This code you showed, will work but it will error out if that particular child doesn't have a name
Code:
local children = { UIParent:GetChildren() }

for _, child in ipairs(children) do
     print("child: " .. child:GetName());
end
Change it to the following and see what output you get then.
Code:
local children = { UIParent:GetChildren() }

for _, child in ipairs(children) do
     local name = child:GetName()
     if name then print(name) else print("Not Named") end
end
You could then expand that as a recursive function to repeat the process for every frame... then instead of printing the name out, simply create a table of frames with a name containing the frame handle ... then you can use that table for a search by name tool.

I've not needed to do this myself but theoretically it is sound.
__________________
  Reply With Quote