World of Warcraft API/Mikk's spiel on chat windows

You may or may not have asked yourself why there's so many API functions dealing with chat windows.

No? Well, I have.


 * Go look at World of Warcraft API.


 * Then look at World of Warcraft API.


 * Now, ask yourself... why are there so many functions doing more or less the same thing?

There are functions to join channels. In both places. There are functions to leave channels. In both places.

There are functions to manipulate colors there. How many AddOns do you know of that require APIs to change their visual configuration? That's right: none :-)

Here's my take on it: Chat windows were among the first things that got implemented in FrameXML. Up to that point, Blizzard's programmers were used to doing all the work in the game engine itself, and I think that affected their design choices quite a great deal. If you think about it, it's perfectly possible to implement a new set of chat windows that use NONE of the "Chat Window Function" APIs. Well, at least, now it is. But perhaps it wasn't back then; maybe you couldn't even keep state between sessions from Lua code.

Come to think of it, there might be one reason. I seem to remember something about chat channel settings surviving a reinstall (but I won't swear to it), so maybe those settings actually get stored on the server, too, via the APIs. In which case it'd actually make sense, sort of, to have APIs for it. Except, personally, I still wouldn't have implemented setting storage in a way that needs to insert itself smack between the flow of user actions and display reactions. :-)

(Aye, this page is quite pointless. I just felt I had to share my ramblings.  - Who knows, perhaps I've managed to clear some fog for someone else in the process.)