Argument is cut short

Events happening in the community are now at Drupal community events on www.drupal.org.
Fixdit's picture

I had this problem before with the views.getViews and node.load services using Flash AS3. I would need to generate an Array to pass even a single string argument or it would only utilise the very first digit?!.

AS3 code:

var obj:Object = ["123"];
var nodeArg:Array = new Array( obj );

drupal.service(loadContent,onFault,"node.load", nodeArg[0],['nid','title']);

resulting argument = "123"

I'm using the same kind of code as when I load nodes to now save them.

AS3 code:

     public function init() {
           var gatewayUrl:String = "http://www.example.com/theLab2/services/amfphp/gateway.php";
            gateway = new RemotingService(gatewayUrl);
         var responder:Responder = new Responder(onResult, onFault);

           var obj:Object = new Object();
         obj = ['00:00:10']
           var arg:Array = new Array( obj );

         var edit:Object = new Object();
            edit.type = "game";
          edit.title = "game_test";
            //edit.field_date_timer = arg[0];
          edit.field_integer_time = arg[0];
          trace(arg[0]);

            gateway.call("node.save", responder, edit);
      }

resulting argument = "0"

An error is kicked up if I only supply a String as an argument and I get the first single digit if I use an Array?! Why does it do this to a String? I'm really stuck here. If I haven't explained thi well, please let me know ;)
Cheers,
Beechy

Services

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: