Hello, I've been looking all over the web for the answer to
my problem, but I've had no success so I'm posting here.
I am writing a chat client with audio/video support, and I'm
having a bit of a problem adding users to the list component. (It
works fine when I output them in a textarea). After alot of
confusion I managed to actually get them to add to the list using
an array. But when a user joins the room, it shows all the
nicknames again. For Example. I join as Guest1, Guest 1 gets added
to the list, then I join under another name e.g Guest2 and it adds
Guess1again because I don't know howto clear the list before it
adds again. Although I do know why this is happening, but I'm not
sure howto implement it. Here's the code:
Please help me if you can, thanks!