1 Reply Latest reply on Nov 27, 2008 5:21 PM by Newsgroup_User

    [object] [Object]

    MrFork Level 1
      Im tracing my array with the Flex debugger but I'm seeing [Object] [Object] instead of the data. Here is the code

      public function populateDistributionData():void
      {
      var noSup:Array = new Array;
      var tempNo:Number = 0;
      var tempNoTwo:Number = 0;
      var str:String = new String;

      // Circulate Array to get number of supermarkets

      for (var i:int = 0; i<whatsIn.length; i++)
      {
      if (whatsIn .mccsub == "Tier 1")
      {
      tempNo++;
      }


      if (whatsIn
      .mccsub == "Tier 3")
      {
      tempNoTwo++
      }

      }
      noSup.push({name:"Tier 1", amount:tempNo});
      noSup.push({name:"Tier 3", amount:tempNoTwo});


      trace (noSup);


      }

      Can anyone help?

      Thanks
        • 1. Re: [object] [Object]
          Level 7

          "MrFork" <webforumsuser@macromedia.com> wrote in message
          news:gglv8f$m8s$1@forums.macromedia.com...
          > Im tracing my array with the Flex debugger but I'm seeing [Object]
          > [Object]
          > instead of the data. Here is the code
          >
          > public function populateDistributionData():void
          > {
          > var noSup:Array = new Array;
          > var tempNo:Number = 0;
          > var tempNoTwo:Number = 0;
          > var str:String = new String;
          >
          > // Circulate Array to get number of supermarkets
          >
          > for (var i:int = 0; i<whatsIn.length; i++)
          > {
          > if (whatsIn .mccsub == "Tier 1")
          > {
          > tempNo++;
          > }
          >
          >
          > if (whatsIn
          .mccsub == "Tier 3")
          > {
          > tempNoTwo++
          > }
          >
          > }
          > noSup.push({name:"Tier 1", amount:tempNo});
          > noSup.push({name:"Tier 3", amount:tempNoTwo});
          >
          >
          > trace (noSup);
          >
          >
          > }
          >
          > Can anyone help?

          I think if you look at the docs for ObjectUtils you may find something that
          will help you.

          HTH;

          Amy