SendChatMessage and illegal chars
View Single Post
01-22-13, 05:52 PM
A Molten Giant
Join Date: Jul 2006
I guess I got a little confused on what the OP wanted to do. I thought we were still talking about links.
My explanation on channel links are to allow the user of the addon to click the link and open chat to that channel (relative to the user of course).
I'm going to try to condense this entire conversation into an easy explanation. To start with, we'll examine what happens when you send a message into chat. It all starts with a call to
, which in turn, sends the message out to the chat servers. This is all it does, this function alone has nothing to do with displaying anything to the user. In addition to forwarding the message out to the intended people, the chat server responds with an echo, the message you sent as normal chat event. This is picked up by the OnEvent handler of any frame that has the respective event registered. The OnEvent handler set on the ChatFrames process this echo that looks exactly like any other chat message, formats it, and calls
to display it. This should explain what the difference is between these two functions.
On to UI Escape Sequences. These generally can be used on any widget that displays text, like FontStrings. Though, ChatFrames are the only widget that allows you to click links. This is the only part of the WoW API where these are of any significance. Everywhere else, they're nothing more than just contents of a string. When it comes to sending a message though
, with few exceptions, UI Escape Sequences are forbidden. These exceptions being full links (links including the appropriate color codes generated with them). Note that not all links are supported by
. Additional restrictions do apply.
For more information, see the following links:
UI Escape Sequences
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
Last edited by SDPhantom : 01-22-13 at
View Public Profile
Send a private message to SDPhantom
Visit SDPhantom's homepage!
Find More Posts by SDPhantom