Sorry for the delay as I was not at home. Anyway, if I understand it correctly, if I want to clear the text (I do not want to clear the tab names themselves) of both the chat frames and their docked windows, then this will work?
Lua Code:
for i = 1, NUM_CHAT_WINDOWS do
local window = _G["ChatFrame"..i]
window:Clear()
-- now clear docked tabs of their text
local chatFrame, chatTab
for _, chatFrameName in pairs(CHAT_FRAMES) do
local frame = _G[chatFrameName]
chatFrame = frame
chatTab = _G[chatFrame:GetName().."Tab"]
chatTab:Clear()
end
end