Page 1 of 1

some bugs in document

Posted: 04 Feb 2006, 13:50
by alvin3343
4.4 User class

Code: Select all

getId():Number  	                          returns the room Id
getName():String 	  	                      returns the room name
getVariable(varName:String):Object 	  	returns a room variable
getVariables():Object 	  	             returns a list of all the room variables
isSpectator():Boolean 	  	returns true if the room is a game room
These should be returns the " user" not the "room "

4.4 getActiveRoom()

Code: Select all

Example:
var roomId:Number = smartFox.getActiveRoom()
This should be var roomObj:Room=smartFox.getActiveRoom()

4.4 joinRoom()

Code: Select all

Parameters:
roomId 	  	the id of the room you want to join
the name of the room should be OK to be a parameter..

4.4sendObjectToGroup()

Code: Select all

roomId  	   	An array containing one or more recipient id
"roomId" should be "userList"

4.4 onLogin()

Code: Select all

Usage:
smartFox.onLogin(success:String, name:String, errorMsg:String) 
success:Boolean..

4.4 onRoomListUpdate()
roomList only contains a userList of current room.
this point should be mentioned. this makes many people confused I think.

4.4 onUserEnterRoom()

Code: Select all

Example:
smartFox.onUserEnterRoom = function(roomId:Number, userObj:Object)
userObj:User

7.1 User class

Code: Select all

getVariable(name)  	   	Return the room variable with the requested name
getVariables() 	  	Return a java.util.HashMap with all the Room Variables
should be user variable

Posted: 06 Feb 2006, 07:09
by Lapo
Thanks for your help, I've fixed the "bugs" :)
4.4 onRoomListUpdate()
roomList only contains a userList of current room.
this point should be mentioned. this makes many people confused I think.
Humm.. I am not sure if I understand the problem? Could you explain it a little bit better?

Thanks :)

Posted: 09 Feb 2006, 07:55
by alvin3343
Welcome :lol:

I mean that when onRoomListUpdate() event is fired,
sfs receive a roomlist contains Room objects within current zone.
According to the document , Room obj contains a list of User objects.
So people may think that each Room object should have a list of its User objects.
But in fact, only the room which client is currrent in has a user list.

On the other words, when client receive onRoomListUpdate() event,
he has only a user list of the room he is connected not all user lists of each room within the zone.

sorry about my English. you got it?

Posted: 09 Feb 2006, 08:09
by Lapo
Perfectly clear! Thanks :)