Expand my Community achievements bar.

Simple Chat model

Avatar

Level 1
Hi,



when i try the SimpleChatExample, i can log in as one guest
and one host and chat.



but in my own app, copied from the example, i cannot seem to
send a message. I help debugging what i am doing incorrectly.



in the



public function submitChat(str:String):void

{

chat_mesg_area.text += "\n called submit";

var cmd:ChatMessageDescriptor = new ChatMessageDescriptor();

cmd.displayName =
sess.userManager.getUserDescriptor(sess.userManager.myUserID).displayName;

cmd.msg = str;

chat_mesg_area.text += "\ngot user name " + cmd.displayName;

chatModel.sendMessage(cmd);

chat_mesg_area.text += "\n sent message";

chat_mesg_input.text = "";

}



i see log messages all the way to "got display name".



i dont see "sent message" in the logs. how do i get what the
error is from the sendMessage() function?
2 Replies

Avatar

Former Community Member


Hi zizu123,



All the calls you're making in this method are synchronous,
meaning that after sendMessage(), you should immediately be seeing
your trace outs. Are you hitting a run time exception here? Are you
running the debug player? This would also help you see debug output
through traces rather than in an inline TextArea.



thanks

nigel

Avatar

Level 1
Thanks Nigel. I thought I had the debugger version but during
the upgrade to flash 10 i guess i forgot to have it install the
debug version.



Its working now after debugging.



Regards,

Schubert