Just process the normal chat frames normally, and hook the function that opens temporary windows. Here's what I do in my chat addon:
Code:
for i = 1, NUM_CHAT_WINDOWS do
self:ProcessFrame(_G["ChatFrame" .. i])
end
hooks.FCF_OpenTemporaryWindow = FCF_OpenTemporaryWindow
FCF_OpenTemporaryWindow = function(...)
local frame = hooks.FCF_OpenTemporaryWindow(...)
self:ProcessFrame(frame)
return frame
end
Then my ProcessFrames function looks like this:
Code:
local frames = {}
function PhanxChat:ProcessFrame(frame)
if frames[frame] then return end
-- do all the stuff here
frames[frame] = true
end
Since it stores a reference to the frame object itself, there's no need to add keys to the frame that could conceivably be removed, or match names, or anything else.