View Single Post
11-07-18, 05:39 PM   #3
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
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:
  1. for i = 1, NUM_CHAT_WINDOWS do
  2.     local window = _G["ChatFrame"..i]
  3.     window:Clear()
  4.  
  5.     -- now clear docked tabs of their text
  6.     local chatFrame, chatTab
  7.     for _, chatFrameName in pairs(CHAT_FRAMES) do
  8.         local frame = _G[chatFrameName]
  9.         chatFrame = frame
  10.         chatTab = _G[chatFrame:GetName().."Tab"]
  11.         chatTab:Clear()
  12.     end
  13. end

Last edited by myrroddin : 11-07-18 at 05:41 PM. Reason: oops, typo
  Reply With Quote