creating roomvars with private...

Post here your questions about the Flash / Flex / Air API for SFS2X

Moderators: Lapo, Bax

Post Reply
omnivibe
Posts: 91
Joined: 05 Oct 2010, 09:23
Contact:

creating roomvars with private...

Post 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!
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post 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.
Paolo Bax
The SmartFoxServer Team
omnivibe
Posts: 91
Joined: 05 Oct 2010, 09:23
Contact:

Post by omnivibe »

Ah, great, thanks for clarifying!
Post Reply