nc = null;
--- In [email protected], "bhaq1972" <mbha...@...> wrote:
>
> myPanel.owner is the same as myPanel.parent so that won't work.
>
> Making it a property would work. What would the disadvantages be with using
> myPanel.parent.parent.parent (a trace shows this to be the navigatorcontent)?
>
> I wonder why there is no such property like 'elementParent' to go with
> addElement() .... analagous to 'parent' and addChild()?
>
> one follow up question -
> I'm now adding the NavigatorContent to a viewstack.
> When i do viewstack.removeChild(nc), how do i make sure nc (naviagtorcontent)
> is destroyed?
> thanks
>
>
> --- In [email protected], "valdhor" <valdhorlists@> wrote:
> >
> > Or make nc a property of the class so you can use it in any method.
> >
> > --- In [email protected], Alex Harui <aharui@> wrote:
> > >
> > > Try myPanel.owner
> > >
> > >
> > > On 6/9/10 8:23 AM, "bhaq1972" <mbhaque@> wrote:
> > >
> > >
> > >
> > >
> > >
> > >
> > > I added a Panel component into a NavigatorContent
> > >
> > > public function aMethod():void
> > > {
> > > var nc:NavigatorContent = new NavigatorContent();
> > >
> > > nc.addElement(myPanel);
> > > }
> > > Now, in another method I want to access this NavigatorContent
> > >
> > > eg
> > > public function anotherMethod(myPanel:Panel):void
> > > {
> > > var nc:NavigatorContent = myPanel.parent as NavigatorContent;
> > >
> > > however nc is not myPanel.parent.
> > >
> > > doing a trace, the navigatorContent is actually
> > > the myPanel.parent.parent.parent
> > >
> > > Is there not a property/method which gets me a reference to the element
> > > Parent
> > >
> > > (a bit like addChild() / parent relationship)
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > Alex Harui
> > > Flex SDK Team
> > > Adobe System, Inc.
> > > http://blogs.adobe.com/aharui
> > >
> >
>