0 Replies Latest reply: Feb 24, 2011 2:12 AM by Ziggizag RSS

    Responder error callback function argument type?

    Ziggizag Community Member

      Hi,

       

      Simple question - presume the following AS3 code:

       

      var param:String = "Hello World";

      nc = new NetConnection();

      nc.connect("gateway.php");
      nr = new Responder(onRespond, onRespondError);
      nc.call("someClass.someFunction", nr, param);

       

      Please, inform mme precisely what is expected type of argument passed to callback functions onRespond and onRespondError ?

       

      I believe in case of onRespond function the situation is as follows:

       

      function onRespond(res:*):void{

           'res' is just the data sent from server and it can be of any type,

           dependent on the actual service PHP code

           (so it can be a string, a number, an array or an object - whatever)

      }

       

      But please tel me what is happening in case of error???

      What is the argument passed to onRespondError function? What type? What structure?

       

      function onRespondError(res:*):void{

           what is 'res' actually, what should I expect here ???

      }


      Please feedback !