1 Reply Latest reply on Dec 16, 2008 6:21 AM by Newsgroup_User

    Accessing Grouping Collection newCollection variable

    shawnyale
      Upon looking at my grouping collection, I noticed a new little property called newCollection, however, its icon is a red square in the variable watcher indicating that its a private property. I need to get read access to this property since it has nicely packages objects inside with my groups.

      Is there a way to be able to get this property by default? Or do I have to change and recompile my Flex SDK? I would think that something like that would be public since it would allow you to use the grouping collection with other datavis components such as charts without having to perform loop after loop. You would be able to use the already grouped collection and create a new series based on each grouping object and set the series dataProvider to that object.children property and have a nice dynamic chart entry point.

      The scenario of this approach would be when you have an array collection as your dataProvider for a chart, but you want to group your chart data based upon the unique values within the array collection. You would be able to use the newCollection objects in a for each loop to generate the individual series dynamically.

      Maybe this should be a feature request?
        • 1. Re: Accessing Grouping Collection newCollection variable
          Level 7

          "shawn.yale" <syale@triad.rr.com> wrote in message
          news:gi7frp$lc$1@forums.macromedia.com...
          > Upon looking at my grouping collection, I noticed a new little property
          > called
          > newCollection, however, its icon is a red square in the variable watcher
          > indicating that its a private property. I need to get read access to this
          > property since it has nicely packages objects inside with my groups.
          >
          > Is there a way to be able to get this property by default? Or do I have
          > to
          > change and recompile my Flex SDK? I would think that something like that
          > would
          > be public since it would allow you to use the grouping collection with
          > other
          > datavis components such as charts without having to perform loop after
          > loop.
          > You would be able to use the already grouped collection and create a new
          > series
          > based on each grouping object and set the series dataProvider to that
          > object.children property and have a nice dynamic chart entry point.
          >
          > The scenario of this approach would be when you have an array collection
          > as
          > your dataProvider for a chart, but you want to group your chart data based
          > upon
          > the unique values within the array collection. You would be able to use
          > the
          > newCollection objects in a for each loop to generate the individual series
          > dynamically.
          >
          > Maybe this should be a feature request?

          I'd go into GroupingCollection and find a protected method that uses that
          variable, then extend GroupingCollection and add code of your own that grabs
          that information and copies it to your own variable.

          HTH;

          Amy