Page 1 of 1

creating roomvars with private...

Posted: 14 Apr 2011, 10:16
by omnivibe
I'm a little confused looking at the docs...

at http://www.smartfoxserver.com/docs/ in section 5.11, it says to just create roomvars by using general Object()s with specific properties like name, val, etc.

at http://docs2x.smartfoxserver.com/api-docs/asdoc/ however, it says to use an array of SFSRoomVariable objects

Which is it? (note, this also seems to apply to user variables...) :)

Also- the documentation for SFSRoomVariable says "setting the isPrivate property manually has no effect on the server and can disrupt the API functioning. This flag can be set when the Room Variable is created only."

That's very confusing since there is no option to set these flags in the constructor!

So how do I create a SFSRoomVariable of type private and/or persistant?

Thanks!

Posted: 15 Apr 2011, 11:15
by Bax
First of all, the two links you posted refer to two different products: the first to SFS 1.x, the second to SFS2X.

As you posted in the SFS2X forum, I believe you are interested to the second document only.

Yes, it seems we have to improve the documentation: you can set the isPrivate and isPersistent flag right after you create the RoomVariable object, but you can't modify those flags manually later, after the variable has been submitted to the server.

Posted: 26 Apr 2011, 06:16
by omnivibe
Ah, great, thanks for clarifying!