That will only work for XML based Trees, if you are not using xml but
arraycollections then you would have to get to selectitem, find it in the
dataprovider arraycollection and then try to find its parent, what i usually
do have a reference parent inside the data model ie:
class TreeNode
{
parent:TreeNode
label:String
data:Number
}
On Fri, Oct 24, 2008 at 4:01 AM, Tracy Spratt <[EMAIL PROTECTED]> wrote:
> "…how to get to a current node of the tree" That is not the question
> you asked. Please ask the question you want answered.
>
> Sigh.
>
> var xmlSelectedNode:XML = XML(MyTree.selectedItem);
>
> var xmlParentNode:XML = xmlSelectedNode.parent();
>
> trace(xmlParentNode.toXMLString());
>
> Tracy
> ------------------------------
>
> *From:* [email protected] [mailto:[EMAIL PROTECTED] *On
> Behalf Of *markgoldin_2000
> *Sent:* Thursday, October 23, 2008 7:24 PM
> *To:* [email protected]
> *Subject:* [flexcoders] Re: Tree parent node
>
>
>
> But I dont know how to get to a current node of the tree. I tried
> selectedItem but it's empty. At least for me.
>
> --- In [email protected] <flexcoders%40yahoogroups.com>, "Tracy
> Spratt" <[EMAIL PROTECTED]> wrote:
> >
> > C'mon, man, do a little work before posting. Search the docs for:
> XML
> > parent. You can't miss it.
> >
> >
> >
> > Tracy
> >
> >
> >
> >
> >
> >
> >
> > ________________________________
> >
> > From: [email protected] <flexcoders%40yahoogroups.com>
> [mailto:[email protected] <flexcoders%40yahoogroups.com>] On
> > Behalf Of markgoldin_2000
> > Sent: Thursday, October 23, 2008 2:12 PM
> > To: [email protected] <flexcoders%40yahoogroups.com>
> > Subject: [flexcoders] Tree parent node
> >
> >
> >
> > Is there a way to find an immediate parent of a given node?
> >
> > Thanks
> >
>
>
>
--
Fotis Chatzinikos, Ph.D.
Founder,
Phinnovation
[EMAIL PROTECTED],