SFSEvent.OBJECT_MESSAGE not catching event

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Post Reply
whornak
Posts: 86
Joined: 22 Sep 2009, 11:05

SFSEvent.OBJECT_MESSAGE not catching event

Post by whornak »

I am attempting to use the ObjectMessageRequest functionality but the event listener is not catching the event.

Current OpenSpace version: 2.0.4 | 1.0.2
Current SmartFoxServer version: 1.1.6

Within the Ghost object:

1) I have configured an event listener set on the stage as such:

StageReference.getStage().addEventListener(SFSEvent.OBJECT_MESSAGE, processObjectMessageRequest, false, 0, true);

2) I dispatch the ObjectMessageRequest event as such:

SingletonSmartFoxClient.getInstance().send(new ObjectMessageRequest(_sfsoBlnToRemove as ISFSObject));

3) I see in the smartfox.log that it is received and dispatched:

12 Feb 2014 | 07:03:47,812 | DEBUG | com.smartfoxserver.v2.controllers.SystemController-1 | v2.controllers.SystemController | | {IN}: GenericMessage
12 Feb 2014 | 07:03:47,812 | DEBUG | com.smartfoxserver.v2.controllers.SystemController-1 | v2.protocol.SFSProtocolCodec | | {OUT}: GenericMessage
12 Feb 2014 | 07:03:47,812 | DEBUG | com.smartfoxserver.v2.controllers.SystemController-1 | protocol.binary.BinaryIoHandler | | Binary size: 255

4) In the flashlog.txt it seems as if it is received:

[SFS - INFO] GenericMessage { Message id: 7 }
{ Dump: }

(int) u: 5
(sfs_object) p:
(int) StringWidth: 5
(int) StringAlpha: 0
(utf_string) ReferenceName: mcRoundBalloon0
(int) chosenColor: 12403099
(int) StringAngleOffset: 0
(int) StringLength: 40
(int) StringColor: 16711680
(utf_string) SystemName: instance2487
(utf_string) BalloonName: mcRoundBalloon

(byte) t: 4
(int) r: 4

5) But the method setup in the event listener never gets called.
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: SFSEvent.OBJECT_MESSAGE not catching event

Post by Bax »

is that StageReference.getStage() returning a reference to your SmartFoxClient instance?
This is the only reason coming to my mind why this shouldn't be working.
Paolo Bax
The SmartFoxServer Team
Post Reply