Tristanian |
09-18-09 06:37 AM |
Quote:
Originally Posted by Layrajha
(Post 159314)
After thinking about it again and reading Seerah's example, I think it was just something like looping through the children of UIParent or WorldFrame, or something like this.
|
Correct. Something along the lines of (for nameplates at least):
(Drycoded)
local nameplates = { WorldFrame:GetChildren() }
local num = #nameplates
if num > 0 then
for i = 1, num do
nameplates[i]:<Method>(...) -- do something
end
end
Quote:
As you create a frame with no parent by calling CreateFrame'Frame', this method wouldn't work.
|
Also correct, as I've mentioned in a similar thread.
Quote:
The only way I can think of to gain access to this frame (without editing your code) would be to hook CreateFrame or one of the methods that you use on the frame, using an addon loaded before yours. I'm not sure how the hook would recognize your frame among the other frames created though. Using debugstack() would probably work?
|
Not sure if that would accomplish much, since it has too many issues plus I'm not even sure if the hook would execute for frames created via xml.
All in all, if you absolutely need to reference/modify an unnamed frame created by another addon, either bug the author to "expose" it or find a way around it. More often than not, unnamed frames exist in such a state for good reason.
|