[swx] swx timeout Handler

info at dietlev.be info at dietlev.be
Fri Jul 13 05:49:15 EDT 2007


Hi everyone,

 

I finally got started with SWX after Aral's "Rediscovering fun" session at
Multimania in Kortrijk, Belgium.

Downloaded everything, setting things up. it all works like a charm !

 

The only problem I'm having is the timeout. 

When I followed the tutorial from swxformat.org with the Calculator class, I
noticed that the timeout isn't working here.

The sleep() function is working in PHP ( as tested in the Service Explorer
), but Flash doesn't seem to care about it and just goes ahead and gets the
data.

 

This is the flash code ( hope I didn't make any silly mistakes ^^ )

 

----------------------------------------------------------------------------
-----------------

 

import org.swxformat.SWX;

 

var swx:SWX = new SWX();

swx.gateway = "http://localhost/swx/php/swx.php";

swx.encoding = "GET";

swx.debug = true;

swx.timeout = 2;

 

var callParameters:Object = 

{

                serviceClass : "Calculator",

                method : "addNumbers",

                args : [35,7],

                result : [this, resultHandler],

                timeout : [this, timeoutHandler]

}

swx.call(callParameters);

 

function resultHandler(event:Object){

                status_txt.text = event.result;

}

 

function timeoutHandler(){

                status_txt.text = "euh... nah";

}

 

 

 

Thx in advance and greetings from Belgium,

 

dietlev

 

 

 

 

 

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/swx_osflash.org/attachments/20070713/ac2087ae/attachment.html 


More information about the swx mailing list