1 Reply Latest reply on Aug 28, 2008 8:01 PM by Newsgroup_User

    How to use list in flex

    vikceo
      I want to parse a XML file and want each attribute under a particular node to be added in a list. I know in java doing so. it is just creating it as List list = new ArrayList(); and then using list.add(<Object>) for each item.

      But in flex i can see that list.addChild() takes an item of type DisplayObject. But what i need is just strings. so how to do that?
        • 1. Re: How to use list in flex
          Level 7

          "vikceo" <webforumsuser@macromedia.com> wrote in message
          news:g97ojg$en9$1@forums.macromedia.com...
          >I want to parse a XML file and want each attribute under a particular node
          >to
          > be added in a list. I know in java doing so. it is just creating it as
          > List
          > list = new ArrayList(); and then using list.add(<Object>) for each item.
          >
          > But in flex i can see that list.addChild() takes an item of type
          > DisplayObject. But what i need is just strings. so how to do that?

          I think you're looking for ArrayCollection and addItem.

          HTH;

          Amy