onUserVariablesUpdate returning wrong values
Posted: 22 Nov 2007, 01:54
Hello,
I am using FlexBuilder 2 (AS3) with SmartFox Server.
I am getting the wrong values back from SFSEvent in onUserVariablesUpdate . I created an array called userVars and set the values, then called sfs.setUserVariables(userVars); This fires onUserVariablesUpdate().
I see the xml come back from the server correctly as follows:
[ RECEIVED ]: <msg t='sys'><body action='uVarsUpdate' r='1'>
<user id='20' /><vars><var n='NewX' t='n'><![CDATA[589]]></var>
<var n='UserID' t='n'><![CDATA[20]]></var><var n='NewY' t='n'>
<![CDATA[145]]></var></vars></body></msg>, (len: 212)
However when I retrieve SFSEvent in onUserVariablesUpdate(evt:SFSEvent) I get the following:
changedVars = Array (@3c4a461)
[0] = "NewX"
[1] = "UserID"
[2] = "NewY"
length = 3
NewX = true
NewY = true
UserID = true
I dont understand why the values are true instead of the values I can see in the CDATA in the xml??? Is this a bug? Is it getting fixed in 1.6?
Thanks,
Jeff
P.S. Happy Thanksgiving to those that celebrate it.
I am using FlexBuilder 2 (AS3) with SmartFox Server.
I am getting the wrong values back from SFSEvent in onUserVariablesUpdate . I created an array called userVars and set the values, then called sfs.setUserVariables(userVars); This fires onUserVariablesUpdate().
I see the xml come back from the server correctly as follows:
[ RECEIVED ]: <msg t='sys'><body action='uVarsUpdate' r='1'>
<user id='20' /><vars><var n='NewX' t='n'><![CDATA[589]]></var>
<var n='UserID' t='n'><![CDATA[20]]></var><var n='NewY' t='n'>
<![CDATA[145]]></var></vars></body></msg>, (len: 212)
However when I retrieve SFSEvent in onUserVariablesUpdate(evt:SFSEvent) I get the following:
changedVars = Array (@3c4a461)
[0] = "NewX"
[1] = "UserID"
[2] = "NewY"
length = 3
NewX = true
NewY = true
UserID = true
I dont understand why the values are true instead of the values I can see in the CDATA in the xml??? Is this a bug? Is it getting fixed in 1.6?
Thanks,
Jeff
P.S. Happy Thanksgiving to those that celebrate it.