Smartfox bug in FP 11

You think you've found a bug? Please report it here.

Moderators: Lapo, Bax

Post Reply
User avatar
marsoups
Posts: 167
Joined: 14 Apr 2008, 03:30

Smartfox bug in FP 11

Post by marsoups »

Hi,

There is a bug in publishing for flash player 11.

It looks like a method being called is probably overriding a keyword.

If you use this code :

Code: Select all

import it.gotoandplay.smartfoxserver.SmartFoxClient;
var ref = new SmartFoxClient();
This results in two errors :

it\gotoandplay\smartfoxserver\SmartFoxClient.as, Line 2049 1061: Call to a possibly undefined method encode through a reference with static type Class.
it\gotoandplay\smartfoxserver\SmartFoxClient.as, Line 2680 1061: Call to a possibly undefined method decode through a reference with static type Class.

Please can Smartfox issue a remedy to this as soon as possible.

Thanks.
[/code]
User avatar
marsoups
Posts: 167
Joined: 14 Apr 2008, 03:30

Post by marsoups »

Solution is to use the built in method and change "encode" to "stringify"

eg.

line 2680 SmartFoxClient.as
var jso:Object = JSON.stringify(msg)
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Post by rjgtav »

Hi. Well it looks like there is some conflict going between the new JSON that comes with FP11 and the one that SFS1x uses.

Thanks for reporting, will forward this to the team.

Cheers
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Post by Bax »

Issue already reported by other users. The fix will be part of the next release. Basically we need to change the package of the JSON classes used by the API.
The solution adopted bu marsoups is not a ggod one, because would break the compatibility of the API with previous versions of the FP.
Paolo Bax
The SmartFoxServer Team
Post Reply