Author Topic: MessageVectors  (Read 854 times)

What exactly are messageVectors? Is there any documentation I can find on them? Are they useful?

I've never even heard of them. Give an example.

I was playing with GUI stuff and saw GuiMessageVectorCtrl as a control and checked out the methods of it. It has attach and detach as methods with the arg being a "MessageVector Item".

I wasn't aware of them either, but apparently they're just a way to handle multi-line text other than ML-text controls. RTB IRC Client uses them.
You have to make a messageVector object using:
Code: [Select]
new MessageVector(YourMessageVector);
You also need a GuiMessageVectorControl in a GUI, then you need to attach the messagevector object to the GUI control:
Code: [Select]
YourMessageVectorControl.attach(YourMessageVector);


Then you can use this to add lines:
Code: [Select]
YourMessageVector.pushBackLine("Hello this is a line that will appear in YourMessageVectorControl",0);
I'm not exactly sure what other methods there are (it has no proper dump method), but I found these:
pushBackLine("text",0); - add a line at the bottom
pushFrontLine("text",0); - add a line at the top
popBackLine() - remove the line at the bottom
popFrontLine() - remove the line at the top


Great. Looks like it's made to handle chat stuff like Destiny pointed out. Thanks guys.