x


how to parse the SFSObject from the paramemter(smartfox server))

I send a message with SFSObject to smartfox server

void public SendMessageToOther(SFSObject dataObj) {

Room room = smartFox.LastJoinedRoom;

smartFox.Send(new PublicMessageRequest(dataObj.GetUtfString("type").ToString()+":"+dataObj.GetFloat("PositionIdx").ToString(),dataObj));

}

when I use the following script to parse the response data. I get message from parameter but I cant parse the SFSObject from the parameter

void OnPublicMessage(BaseEvent evt) { try { string message = (string)evt.Params["message"]; User sender = (User)evt.Params["sender"];

       // We use lock here to ensure cross-thread safety on the messages collection 
       lock (messagesLocker) {
         messages.Add(sender.Name + " said " + message);
       }
        ISFSObject dt = (SFSObject)evt.Params["params"];

}

**How can I get the ISFSObject of the parameter? **

more ▼

asked Apr 26 '12 at 05:35 PM

gn00422000 gravatar image

gn00422000
0 1 2 3

(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x56
x22

asked: Apr 26 '12 at 05:35 PM

Seen: 404 times

Last Updated: Apr 26 '12 at 05:35 PM