<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Flex 2 :: Tree :: Walking the Tree method</title>
	<link>http://www.blog.teotigraphix.com/2006/10/16/flex-2-tree-walking-the-tree-method/</link>
	<description>Components are the building blocks of our Universe, that is why I make them!</description>
	<pubDate>Tue, 06 Jan 2009 20:04:08 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0</generator>

	<item>
		<title>by: Mohana</title>
		<link>http://www.blog.teotigraphix.com/2006/10/16/flex-2-tree-walking-the-tree-method/#comment-16921</link>
		<pubDate>Wed, 06 Feb 2008 22:21:38 +0000</pubDate>
		<guid>http://www.blog.teotigraphix.com/2006/10/16/flex-2-tree-walking-the-tree-method/#comment-16921</guid>
					<description>Hi Mike,

Your tip to browse the tree from the root worked for me. It was a great help.

walkTree(checkTree, checkTree.dataProvider[0]);

Joshuajh , it should work for you too, if you are using a XMLLListCollection as dataProvider for your tree.

Regards
Mohan Mamidala</description>
		<content:encoded><![CDATA[<p>Hi Mike,</p>
<p>Your tip to browse the tree from the root worked for me. It was a great help.</p>
<p>walkTree(checkTree, checkTree.dataProvider[0]);</p>
<p>Joshuajh , it should work for you too, if you are using a XMLLListCollection as dataProvider for your tree.</p>
<p>Regards<br />
Mohan Mamidala
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Joshuajh</title>
		<link>http://www.blog.teotigraphix.com/2006/10/16/flex-2-tree-walking-the-tree-method/#comment-16205</link>
		<pubDate>Wed, 16 Jan 2008 10:32:26 +0000</pubDate>
		<guid>http://www.blog.teotigraphix.com/2006/10/16/flex-2-tree-walking-the-tree-method/#comment-16205</guid>
					<description>Many thanks!

But, I'm barely know how to use this method if I want to traverse from the tree root.
can someone provide a example for me?

this is my code:

public function showtree (): void {
    walkTree (myTree, &amp;#62;);
}

</description>
		<content:encoded><![CDATA[<p>Many thanks!</p>
<p>But, I&#8217;m barely know how to use this method if I want to traverse from the tree root.<br />
can someone provide a example for me?</p>
<p>this is my code:</p>
<p>public function showtree (): void {<br />
    walkTree (myTree, &gt;);<br />
}
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Maarten</title>
		<link>http://www.blog.teotigraphix.com/2006/10/16/flex-2-tree-walking-the-tree-method/#comment-10748</link>
		<pubDate>Tue, 14 Aug 2007 08:46:56 +0000</pubDate>
		<guid>http://www.blog.teotigraphix.com/2006/10/16/flex-2-tree-walking-the-tree-method/#comment-10748</guid>
					<description>teoti.graphix, thanks!

Yep, true, I see that. But for a OOP-noop like me, the gap is quite large. Learning the OOP is indeed very interresting, but  I`d like to do so starting with Flash instead of with -say- C++, which I'll never need in the rest of my life. ;-) Can anybody recommand any literature that does just that: teach OOP in a AS3 - setting ?</description>
		<content:encoded><![CDATA[<p>teoti.graphix, thanks!</p>
<p>Yep, true, I see that. But for a OOP-noop like me, the gap is quite large. Learning the OOP is indeed very interresting, but  I`d like to do so starting with Flash instead of with -say- C++, which I&#8217;ll never need in the rest of my life. <img src='http://www.blog.teotigraphix.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  Can anybody recommand any literature that does just that: teach OOP in a AS3 - setting ?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: teoti.graphix</title>
		<link>http://www.blog.teotigraphix.com/2006/10/16/flex-2-tree-walking-the-tree-method/#comment-10586</link>
		<pubDate>Wed, 08 Aug 2007 12:01:20 +0000</pubDate>
		<guid>http://www.blog.teotigraphix.com/2006/10/16/flex-2-tree-walking-the-tree-method/#comment-10586</guid>
					<description>Hi,

One Acronym, OOP. Object Oriented Programming uses interfaces.

I started in Flash 5, so yeah I hear what you are saying. But the more complicated things get( the power of Flex and as3) the tighter you need your logic and structure to be.

This just means there is a greater language to learn with more words. But, the more vocabulary you have to work with in any language, lets you express yourself faster and more eloquently.

Peace, Mike</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>One Acronym, OOP. Object Oriented Programming uses interfaces.</p>
<p>I started in Flash 5, so yeah I hear what you are saying. But the more complicated things get( the power of Flex and as3) the tighter you need your logic and structure to be.</p>
<p>This just means there is a greater language to learn with more words. But, the more vocabulary you have to work with in any language, lets you express yourself faster and more eloquently.</p>
<p>Peace, Mike
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Maarten</title>
		<link>http://www.blog.teotigraphix.com/2006/10/16/flex-2-tree-walking-the-tree-method/#comment-10580</link>
		<pubDate>Wed, 08 Aug 2007 10:23:45 +0000</pubDate>
		<guid>http://www.blog.teotigraphix.com/2006/10/16/flex-2-tree-walking-the-tree-method/#comment-10580</guid>
					<description>Dear People,

I'm &quot;migrating&quot; from Flash MX to Flex, and although I was quite dexterious in Flash, I feel completely lost. I'm just wondering: is it just me, or _has_ everything become MUCH more complicated? I mean, why are there no simple methods anymore like nextChild and so fourth. It is indeed a great piece of work you, but why should it be necassary?

I'm curious to hear your (plurar) opinions about it.

Regards!</description>
		<content:encoded><![CDATA[<p>Dear People,</p>
<p>I&#8217;m &#8220;migrating&#8221; from Flash MX to Flex, and although I was quite dexterious in Flash, I feel completely lost. I&#8217;m just wondering: is it just me, or _has_ everything become MUCH more complicated? I mean, why are there no simple methods anymore like nextChild and so fourth. It is indeed a great piece of work you, but why should it be necassary?</p>
<p>I&#8217;m curious to hear your (plurar) opinions about it.</p>
<p>Regards!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Barry Evans</title>
		<link>http://www.blog.teotigraphix.com/2006/10/16/flex-2-tree-walking-the-tree-method/#comment-8694</link>
		<pubDate>Tue, 12 Jun 2007 09:05:41 +0000</pubDate>
		<guid>http://www.blog.teotigraphix.com/2006/10/16/flex-2-tree-walking-the-tree-method/#comment-8694</guid>
					<description>Thanks Mike your suggestion worked 100%, your a *

Your function is a great little piece of code... its been a while since i had to write a recursive function, it would probably have taken me about to a week to get through that one on my own!

Keep up the good work, and thanks again for your help</description>
		<content:encoded><![CDATA[<p>Thanks Mike your suggestion worked 100%, your a *</p>
<p>Your function is a great little piece of code&#8230; its been a while since i had to write a recursive function, it would probably have taken me about to a week to get through that one on my own!</p>
<p>Keep up the good work, and thanks again for your help
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: teoti.graphix</title>
		<link>http://www.blog.teotigraphix.com/2006/10/16/flex-2-tree-walking-the-tree-method/#comment-8535</link>
		<pubDate>Fri, 08 Jun 2007 17:31:05 +0000</pubDate>
		<guid>http://www.blog.teotigraphix.com/2006/10/16/flex-2-tree-walking-the-tree-method/#comment-8535</guid>
					<description>Hi Barry,

walkTree(checkTree, checkTree.dataProvider[0]);

should do it if I remember correctly.

Peace, Mike

PS, depends i think if you are using showRoot, and what your XML looks like. If you don't have just 'one' root, you will need to create a for() loop that loops through the base of your tree and calls walkTree().</description>
		<content:encoded><![CDATA[<p>Hi Barry,</p>
<p>walkTree(checkTree, checkTree.dataProvider[0]);</p>
<p>should do it if I remember correctly.</p>
<p>Peace, Mike</p>
<p>PS, depends i think if you are using showRoot, and what your XML looks like. If you don&#8217;t have just &#8216;one&#8217; root, you will need to create a for() loop that loops through the base of your tree and calls walkTree().
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Barry Evans</title>
		<link>http://www.blog.teotigraphix.com/2006/10/16/flex-2-tree-walking-the-tree-method/#comment-8529</link>
		<pubDate>Fri, 08 Jun 2007 16:40:08 +0000</pubDate>
		<guid>http://www.blog.teotigraphix.com/2006/10/16/flex-2-tree-walking-the-tree-method/#comment-8529</guid>
					<description>Can i ask a quick (and probably simply answered question!)?
Im finding it tough to get my head round the ITreeDataDescriptor class in Flex 2.

I want to walk through a tree in my application, and your function is definatley going to help.
The thing is, i want to walk through the whole tree FROM THE FIRST NODE!

The second parameter your function takes is a node of the tree (i am guessing), this has been a problem i have been trying to figure out for the past 4-5 hours! I cant figure out how to get access to the trees first XML node.

How do i get the function to walk through a tree simply by passing the tree as a parameter?

I hope you can help, i am stuck in my tracks with some very important development until i can get this done... and the deadline approaches... FAST

Thanks in advance.

Barry

p.s.
Im not sure this is of great importance or help, but i will add my XML and how i assign it to my tree's dataprovider:

    
        
        
    

    
        
    
  ;

private function initTree() : void{
    folderCollection = new XMLListCollection(folderList);
    checkTree.dataProvider = folderCollection;
}
]]&amp;#62;</description>
		<content:encoded><![CDATA[<p>Can i ask a quick (and probably simply answered question!)?<br />
Im finding it tough to get my head round the ITreeDataDescriptor class in Flex 2.</p>
<p>I want to walk through a tree in my application, and your function is definatley going to help.<br />
The thing is, i want to walk through the whole tree FROM THE FIRST NODE!</p>
<p>The second parameter your function takes is a node of the tree (i am guessing), this has been a problem i have been trying to figure out for the past 4-5 hours! I cant figure out how to get access to the trees first XML node.</p>
<p>How do i get the function to walk through a tree simply by passing the tree as a parameter?</p>
<p>I hope you can help, i am stuck in my tracks with some very important development until i can get this done&#8230; and the deadline approaches&#8230; FAST</p>
<p>Thanks in advance.</p>
<p>Barry</p>
<p>p.s.<br />
Im not sure this is of great importance or help, but i will add my XML and how i assign it to my tree&#8217;s dataprovider:</p>
<p>  ;</p>
<p>private function initTree() : void{<br />
    folderCollection = new XMLListCollection(folderList);<br />
    checkTree.dataProvider = folderCollection;<br />
}<br />
]]&gt;
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Barry Evans</title>
		<link>http://www.blog.teotigraphix.com/2006/10/16/flex-2-tree-walking-the-tree-method/#comment-8528</link>
		<pubDate>Fri, 08 Jun 2007 16:38:09 +0000</pubDate>
		<guid>http://www.blog.teotigraphix.com/2006/10/16/flex-2-tree-walking-the-tree-method/#comment-8528</guid>
					<description>Can i ask a quick (and probably simply answered question!)?
Im finding it tough to get my head round the ITreeDataDescriptor class in Flex 2.

I want to walk through a tree in my application, and your function is definatley going to help.
The thing is, i want to walk through the whole tree FROM THE FIRST NODE!

The second parameter your function takes is a node of the tree (i am guessing), this has been a problem i have been trying to figure out for the past 4-5 hours! I cant figure out how to get access to the trees first XML node.

How do i get the function to walk through a tree simply by passing the tree as a parameter?

I hope you can help, i am stuck in my tracks with some very important development until i can get this done... and the deadline approaches... FAST &amp;#62;
    
        
        
    

    
        
    
  ;

private function initTree() : void{
    folderCollection = new XMLListCollection(folderList);
    checkTree.dataProvider = folderCollection;
}</description>
		<content:encoded><![CDATA[<p>Can i ask a quick (and probably simply answered question!)?<br />
Im finding it tough to get my head round the ITreeDataDescriptor class in Flex 2.</p>
<p>I want to walk through a tree in my application, and your function is definatley going to help.<br />
The thing is, i want to walk through the whole tree FROM THE FIRST NODE!</p>
<p>The second parameter your function takes is a node of the tree (i am guessing), this has been a problem i have been trying to figure out for the past 4-5 hours! I cant figure out how to get access to the trees first XML node.</p>
<p>How do i get the function to walk through a tree simply by passing the tree as a parameter?</p>
<p>I hope you can help, i am stuck in my tracks with some very important development until i can get this done&#8230; and the deadline approaches&#8230; FAST &gt;</p>
<p>  ;</p>
<p>private function initTree() : void{<br />
    folderCollection = new XMLListCollection(folderList);<br />
    checkTree.dataProvider = folderCollection;<br />
}
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Michael</title>
		<link>http://www.blog.teotigraphix.com/2006/10/16/flex-2-tree-walking-the-tree-method/#comment-6740</link>
		<pubDate>Wed, 07 Mar 2007 21:21:05 +0000</pubDate>
		<guid>http://www.blog.teotigraphix.com/2006/10/16/flex-2-tree-walking-the-tree-method/#comment-6740</guid>
					<description>Mike,

Does this work if the tree uses a labelfunction or a custom renderer? I am using a labelfunction and when this method tries to execute this statement:

var label:String =  childItem[tree.labelField];

label is set to &quot;&quot;.

When I look at tree.labelField in the debugger I see &quot;label&quot;.  I am using XML to populate the tree and childItem is XML when I look at it.  Does it sound like I am doing something wrong or do you need more details?

Here is my trace after going through a few nodes:
-- Sub Node ::   Is Branch ::  true
-- Sub Node ::   Is Branch ::  true

Thank you,
Michael</description>
		<content:encoded><![CDATA[<p>Mike,</p>
<p>Does this work if the tree uses a labelfunction or a custom renderer? I am using a labelfunction and when this method tries to execute this statement:</p>
<p>var label:String =  childItem[tree.labelField];</p>
<p>label is set to &#8220;&#8221;.</p>
<p>When I look at tree.labelField in the debugger I see &#8220;label&#8221;.  I am using XML to populate the tree and childItem is XML when I look at it.  Does it sound like I am doing something wrong or do you need more details?</p>
<p>Here is my trace after going through a few nodes:<br />
&#8211; Sub Node ::   Is Branch ::  true<br />
&#8211; Sub Node ::   Is Branch ::  true</p>
<p>Thank you,<br />
Michael
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
