Looks like something is wrong with the Hashtable being sent back from the server using the c# client api for the OnUserVariablesUpdate event.
Client-side code:
Code: Select all
Hashtable uVars = new Hashtable();
uVars.Add("avatarName", "Homer");
uVars.Add("posx", 100);
uVars.Add("posy", 200);
sfc.SetUserVariables(uVars);
Debug statement (xml being sent):
Code: Select all
Debug - 5/6/2009 3:39:02 PM: [Sending]: <msg t='sys'><body action='setUvars' r='
1'><vars><var n='avatarName' t='s'><![CDATA[Homer]]></var><var n='posy' t='n'><!
[CDATA[200]]></var><var n='posx' t='n'><![CDATA[100]]></var></vars></body></msg>However, on the receiving side (I have another client window open that handles the OnUserVariablesUpdate event) the Hashtable I get back is all bools
Here is a debug statement I have in the event handler:
Code: Select all
foreach (object key in updatedVariables.Keys)
{
sb.AppendFormat("key {0}: value {1} || ", key.ToString(), updatedVariables[key].ToString());
}Code: Select all
UserVariablesUpdate - 5/6/2009 3:39:04 PM: user david_633772211073615456 updated
these variables key avatarName: value True || key posy: value True || key posx:
value True ||Thanks!