Search found 15 matches

by cevans
11 May 2021, 03:01
Forum: SFS2X Questions
Topic: MultiHandler in Javascript Extension?
Replies: 3
Views: 4394

Re: MultiHandler in Javascript Extension?

Well I was hoping to do something like this where you have a command like, "register.profile" and I can parse the command and send all "register" prefixed requests to a particular module in the backend.

So I wouldn't have a ton of IF/ELSE statements, it would just be a few conditionals to route a ...
by cevans
10 May 2021, 07:27
Forum: SFS2X Questions
Topic: MultiHandler in Javascript Extension?
Replies: 3
Views: 4394

MultiHandler in Javascript Extension?

Back in SFS 1x , all client requests/commands came through the "handleRequest" handler and from there I parsed the command string and routed the request to appropriate module in other parts of the server code.

With SFS2X I'm using Javascript extensions I was hoping to utilize a similar flow where ...
by cevans
04 May 2021, 10:57
Forum: SFS2X Questions
Topic: Creating native Java Objects in Javascript 2x Server Extension.
Replies: 2
Views: 3842

Re: Creating native Java Objects in Javascript 2x Server Extension.

Great thanks. So I can just pass the Javascript datatypes. I made the mistake of passing an object instead of an array.
by cevans
04 May 2021, 07:06
Forum: SFS2X Questions
Topic: Creating native Java Objects in Javascript 2x Server Extension.
Replies: 2
Views: 3842

Creating native Java Objects in Javascript 2x Server Extension.

This is probably a simple question / answer, but after searching the forum I couldn't find the answer.

I'm using Javascript extensions with the SFs2X server and I'm trying to run the dbManager method, executeInsert(). The problem is the second parameter, it's expecting a Ljava.lang.Object. I don't ...
by cevans
08 Feb 2009, 09:35
Forum: Server Side Extension Development
Topic: Save data when server restarts
Replies: 3
Views: 9341

This would be useful for me as well. If anyone is willing to share a solution or workaround for this it would be greatly appreciated!

Right now I have the server periodically save certain information to XML files. The data isn't important enough to constantly save to the DB, but it's important ...
by cevans
06 Sep 2007, 16:47
Forum: Server Side Extension Development
Topic: Sending to a user after userLost
Replies: 9
Views: 14753

All that isn't necessary. The client receives an OnConnectionLost event. This event is triggered when the connection to the server is closed either by the client or server.

So just display your disconnect message on the client when that event is triggered. :)
by cevans
05 Sep 2007, 05:18
Forum: SmartFoxServer 1.x Discussions and Help
Topic: { Patch } SmartFoxServer PRO 1.5.8c ready
Replies: 18
Views: 32678

Oh yeah, just in case it's not clear, I should mention I'm accessng the JDBC API directly. I'm not using the executeCommand method.

EDIT: I just tried using the executeCommand with the INSERT statement and I got the following message in the log file:
[ SEVERE ] [id: 11] (DbManager.executeCommand ...
by cevans
05 Sep 2007, 05:02
Forum: SmartFoxServer 1.x Discussions and Help
Topic: { Patch } SmartFoxServer PRO 1.5.8c ready
Replies: 18
Views: 32678

I found a pretty serious bug I think.

Before I updated to 1.5.8, I used this code for SQL INSERT statements
var rs = stmt.executeUpdate(sql, stmt.RETURN_GENERATED_KEYS)

This worked just fine in 1.5.1, but now the scripts halt anytime a SQL INSERT statement is used. No error is given whatsoever ...
by cevans
29 Aug 2007, 09:56
Forum: SmartFoxServer 1.x Discussions and Help
Topic: { Patch } SmartFoxServer PRO 1.5.8c ready
Replies: 18
Views: 32678

Server Side Framework - The user object is now passed to both userLost and userExit internal events

I just finished upgrading to the patch (primarily for the above functionality). Do you have a quick code example of this? I can't find it in the docs.

When I loop through the Event object ...
by cevans
07 Aug 2007, 07:42
Forum: Server Side Extension Development
Topic: Program too big jump offset (Line number not available)
Replies: 9
Views: 18177



4- as a last resort it is possible to avoid compiling the code at runtime and let it run in "interpreted" mode. This will probably lead to slower execution of the code but, according to Mozilla's website, it seems that these "code limits" issues disappear in "interpreted mode".

This last ...
by cevans
04 Aug 2007, 21:55
Forum: Server Side Extension Development
Topic: Program too big jump offset (Line number not available)
Replies: 9
Views: 18177

One thing I've noticed is that when I comment out a couple of Trace functions, the script compiles. I also added several conditional statements and it still compiled. But as soon as I uncommented a trace, the script wouldn't compile anymore.

This bug is making me very nervous actually. It means ...
by cevans
04 Aug 2007, 10:32
Forum: Server Side Extension Development
Topic: Program too big jump offset (Line number not available)
Replies: 9
Views: 18177

Sorry to bump this, but I'm also getting the same error. I have about 5000 lines of code and some very long case statements.

Is there workaround or bug fix for this? It's pretty much brought development to a halt at the moment since I can't add anymore code to the server-side script.
by cevans
07 Jul 2007, 05:39
Forum: Server Side Extension Development
Topic: Getting ActionScript UserVariables with Java
Replies: 3
Views: 8462

Yeah a day later I noticed I was using the wrong code, but I still got stuck trying to convert the Object to an Integer list.

So you recommend using a Java list in the ActionScript code? Doh... I've already done a ton of code using the AS arrays and objects. Can you post a tiny code snippet of ...
by cevans
03 Jul 2007, 23:43
Forum: Server Side Extension Development
Topic: Possible to debug at runtime?
Replies: 11
Views: 18637

If you're modifying a Java package, you still have to do a hard restart of the server (./sfs restart) correct?
by cevans
02 Jul 2007, 11:27
Forum: Server Side Extension Development
Topic: Getting ActionScript UserVariables with Java
Replies: 3
Views: 8462

Getting ActionScript UserVariables with Java

Hi!

In my current project I'm using a mix of ActionScript and Java (like 6.6 in the Docs). Basically I use embedded Java classes for areas that need optimal performance.

I'm in the process of converting one of my Actionscript functions to a Java method, but I'm running into a snag. In Actionscript ...