I have found a bug in the sfs client API , which is really a show stopper for us.
Description of the bug:
when handling the SFSEvent.onRoomListUpdate event.
i use the following code.
Code: Select all
for (var rKey:String in e.params.roomList) {
var r:Room = e.params.roomList[rKey];
r.getVariable("SomeVariable");
}
when i fist get the list the variables that have been traced to the console are correct.
later on in my example the variable: "SomeVariable" changes on certain rooms.
after the change of the variable i refresh the room list.
I can see in the raw xml string which i receive from the server that "SomeVariable" has been changed, however when the code above traces "SomeVariable" values to the console , i see that i still have the old values of the variable and not the new ones, the variable value did not update inside the received: e.params.roomList array.
Thank you for the support.
been testing on 1.6.8 and 1.6.9 , both had same results
EDIT:
I have noticed a strange piece of code in SysHandler.handleRoomList()
method:
Code: Select all
/*
* Merge with current room list data, to avoid destroying previous data
* @since 1.6.0
*/
var oldRoom:Room = roomList[roomId]
if (oldRoom != null)
{
room.setVariables( oldRoom.getVariables() )
room.setUserList( oldRoom.getUserList() )
}
Code: Select all
//room.setVariables( oldRoom.getVariables() )