Hello everyone, I’m having some trouble/confusion on how to go about creating an additional ‘chat tab’ in addition to the default tabs of ‘General’ and ‘Combat’ - effectively a tab where an addon can dump all its output to.
I thought calling ‘FCF_OpenNewWindow(“name”)’ would do the job, but when I look around ‘nothing’ is there despite my debugging telling me that my new code created tab is correct. When using /framestack, I can see that (as in the image) that the new (4th tab in this case) edit box is there, but I can’t find any other elements relating to it. Additionally, entering input into it / using ‘addmessage()’ directly to it results in nothing, nor does it pickup anything done in game (though ‘general’ seems to pick it up just fine).
So, I know I’m missing something, I just don’t know what it is…/sad. Also, the terminology gets a bit confusing for UI since I guess the root element of all UI are ‘frames’, which may or may not be called ‘frames’ in the code (like a ‘chat tab’ is also a ‘frame’ correct?), it kind of running together on me.
Any help is appreciated, thank you for reading.
http://cubeupload.com/im/blitzer/chatframeissue.jpg
local newChat = FCF_OpenNewWindow("new Chat")
TSMCUSTOM.CustomPrint("checking chat windows") --says it exists
for i = 1, NUM_CHAT_WINDOWS do
TSMCUSTOM.CustomPrint("i: " .. i)
TSMCUSTOM.CustomPrint(GetChatWindowInfo(i))
end
--[
local name, fontSize, r, g, b, alpha, shown, locked, docked, uninteractable = GetChatWindowInfo(4) --shows correct name, alpha, docked index --shown yes, locked no
TSMCUSTOM.CustomPrint("GetChatWindowInfo(4).name: " .. name)
TSMCUSTOM.CustomPrint("GetChatWindowInfo(4).alpha: " .. alpha)
TSMCUSTOM.CustomPrint("GetChatWindowInfo(4).shown: " .. tostring(shown))
TSMCUSTOM.CustomPrint("GetChatWindowInfo(4).locked: " .. tostring(locked))
TSMCUSTOM.CustomPrint("GetChatWindowInfo(4).docked: " .. docked)
--]
for i = 1, NUM_CHAT_WINDOWS do
_G["ChatFrame" .. i]:AddMessage("This is ChatFrame"..i, 0, 0, 0, GetChatTypeIndex("SAY")) --general and manual tabs are fine, coded one does nothing
end
_G["ChatFrame" .. 4]:AddMessage("test test test") --results in nothing