[swx] swx timeout Handler
Folkert Hielema
nederflash at gmail.com
Fri Jul 13 09:50:23 EDT 2007
Well it works like charm, so two seconds is to much then it's already
happend man, set it to 1 second and it will timeout (at least in my tiny
test.
Good luck,
Folkert
On 7/13/07, info at dietlev.be <info at dietlev.be> wrote:
>
> 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
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> swx mailing list
> swx at osflash.org
> http://osflash.org/mailman/listinfo/swx_osflash.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/swx_osflash.org/attachments/20070713/0c06b9bf/attachment.html
More information about the swx
mailing list