How to traverse/rebuild UIComponent tree structure in Flex -


i have kind of uicomponent grouping may classes "group" , "element".

groups can have children , children may elements or groups again, similar file system or str+g group function in several graphics programs. simplest form of group group children low level groups in tree.

edit: display hierarchy existant, try persist xml.

group    - element    - group       - element       - group          -element          -element    - element    - element 

i want rebuild structure in xml-document persistence. know how build xml document in flex not how (recursively) traverse n-tree correctly.

update:

for getting child nodes 1 make use of following algorithm (pseudo code). somehow don't understand how create xml this.

 walktree(group) {         children = node.getchildren         if(children != null) {             for(int i=0; i<children.length; i++) {                 if(children[i].isgroup()) {                     walktree(group[i]);                 } else {                         trace(child);                 }             }         }     } 

as starter, i'd suggest : http://www.sephiroth.it/tutorials/flashphp/e4x/

so, basically, looking seems e4x in actionscript 3


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -