Thanks - currently I'm using the simple AddMessage method but thought about writing to the buffer directly
But you are right, that's a bad practice
Thanks for the snippet with the message categories
Explanation:
A user of my addon noticed the output appearing in every chat tab instead of only the first one. So i thought i add an option to select the chat tab where the output will appear. During the debugging process i found out that without pChat it's working as expected (only appearing in tab 1). With pChat, the messages appear in every tab. So for now, i'll simply stick with the AddMessage.
Do we use pChat wrong? :/