4 Replies Latest reply on Jul 30, 2006 6:59 AM by eddymilner

    Tree Component ... getting crazy !

      So tree component is terrible , every thing is gone , trying all day to get directly to tree component and no result ,and there is no basic explanation and no examples , i tried to search in Flex Help Content , but I get more Cold Fusion tree help than Flex tree .. spend 800 dollar for flex and get CFHelp , I don’t think is good idea , so pleas help me , how can i add simple tree node with out XML , I hate XML , and i know some how we can work with Tree component directly though ITreeDataDescriptor , but how ..?

      In As2 it was simple and easy, now how to do this I don’t know and I am not only one!
      I am not a specialist in Action Script but in AS2 I never had a problem, and if I did, we have a lot of documentation about AS2 and examples, but Flex trying to sell a product that not supports any examples and documentation... Write in search content ‘tree’ and you get cf tree examples and structures, but I don’t need cftree information, I need flex tree exemplas, but there is few... Working with flex all week I get more tired and depressed.. Any thing I trying to do is going wrong, AS2 is not there any more and I understand that I have to learn AS3 from beginning to understand it... I hate it!!!!!!

      Flex - Rich Application for users and Rich work for Developers!
        • 1. Tree Component ... getting crazy !
          Eddy, chill out man.

          How can you say, "I hate XML," and really even try to learn Flex? Flex is based on XML, MXML is XML, any services you call (HTTP or WEB) are XML. I think it's time for change and time you picked up XML. It's actually very, very simple.

          You don't have to learn AS3 from the ground up. There are a lot of similarities between AS2 and AS3.

          You just need to write a simple function which goes through the array and converts it to xml. While I could program that for you, I think you could probably figure it out yourself.

          But why even bother? Using an XMLList is just as easy. Behold:

          <mx:XMLList id="treeData">
          <node label="Mail Box">
          <node label="Inbox">
          <node label="Marketing"/>
          <node label="Product Management"/>
          <node label="Personal"/>
          <node label="Outbox">
          <node label="Professional"/>
          <node label="Personal"/>
          <node label="Spam"/>
          <node label="Sent"/>

          XML is composed of parents and children. You can do much more with XML than you can with plain old arrays, plus, when's the last time you saw a 10-tiered multi-dimensional array? It's not possible to do something like that without XML.

          Over and out - Taka.
          • 2. Re: Tree Component ... getting crazy !
            eddymilner Level 1
            Yes I agree with you , XML is much better then Array , but some people , for example like me , like to work with array ! For 4 years, I never used XML, and I just don’t like it, all I trying to do is add a data to tree component with out using XML and there is no results? Working all day with flex, searching for help, examples and there is nothing helpful …before it was very easy to add data to tree component with AS2 without XML but I don’t know how to do this with AS3. Only I know that Adobe force me to use XML to put data in tree component , is there a way to ignore XML and control directly tree component or not ? in AS2 we have this functions like addTreeNodeAt or setIsBranch and many more that help us work with tree component but now it’s not there any more , well we can use ITreeDataDescriptor function but how ?! Well if I have to use XML to control data in tree component , I will use but still I want to ignore XML if it possible !
            • 3. Re: Tree Component ... getting crazy !
              go to http://livedocs.macromedia.com/flex/2/langref/ and look up the ITreeDataDescriptor. I think you can add it by doing ITreeDataDescriptor.addChildAt(). All the methods and params are listed there.
              • 4. Tree Component ... getting crazy !
                eddymilner Level 1
                thanxs sloan2b , but there is no exemaples ! what the hell is ITreeDataDescriptor i dont know , it's seems somthing new !