WoW:API RemoveChatWindowChannel: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Creation+notes)
 
No edit summary
Line 1: Line 1:
{{wowapi}} __NOTOC__
{{wowapi}}
 
Blocks further messages from a specified chat channel from appearing in a specific chat frame.
Make a chat channel invisible (hidden) in a specific ChatFrame.  
RemoveChatWindowChannel(windowId, "channelName");
RemoveChatWindowChannel(chatFrameIndex, "channel")
 


== Arguments ==
== Arguments ==
:(chatFrameIndex, "channel")
; windowId : Number - index of the chat window/frame (ascending from 1) to remove the channel from.
 
; channelName : String - name of the chat channel to remove from the frame.
:;chatFrameIndex: Number - Index of the chat frame window (starts at 1)
:;channel: String - The name of the channel you wish to remove (eg. "Trade")
 
 
== Returns ==
:Nothing
 


== Details ==
== Details ==
: As of 3.1.3, This function will not work on its own, due to the chat window object (named "ChatWindow1", etc...) will still store it in the channelList and zoneChannelList tables (see FrameXML\ChatFrame.lua line 2150, function ChatFrame_RemoveChannel(chatFrame, channel)).  One would have to call the ChatFrame_RemoveChannel function to make it work:
* Chat output architecture has changed since release; calling this function alone is no longer sufficient to block a channel from a particular frame in the default UI. Use {{api|ChatFrame_RemoveChannel}}(chatFrame, "channelName") instead, like so:
ChatFrame_RemoveChannel(ChatWindow1, "Trade"); -- DEFAULT_CHAT_FRAME works well, too


ChatFrame_RemoveChannel(ChatWindow1, "Trade"); -- DEFAULT_CHAT_FRAME works well, too
== See also ==
* {{api|AddChatWindowChannel}}

Revision as of 09:01, 9 March 2010

WoW API < RemoveChatWindowChannel

Blocks further messages from a specified chat channel from appearing in a specific chat frame.

RemoveChatWindowChannel(windowId, "channelName");

Arguments

windowId
Number - index of the chat window/frame (ascending from 1) to remove the channel from.
channelName
String - name of the chat channel to remove from the frame.

Details

  • Chat output architecture has changed since release; calling this function alone is no longer sufficient to block a channel from a particular frame in the default UI. Use ChatFrame_RemoveChannel(chatFrame, "channelName") instead, like so:
ChatFrame_RemoveChannel(ChatWindow1, "Trade"); -- DEFAULT_CHAT_FRAME works well, too 

See also