I guess destroyChildAt is more reliable J
From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Tapper
Sent: Thursday, May 05, 2005 10:38
AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Problems
with DestroyChild
Well -
I've come up with a functioning workaround, but
its just plain odd.
If I just destroy the child as I was, it wasnt
working, but if i do both
that and
panel.destroyChildAt(panel.getChildIndex(rowArray[i]));
suddenly it works.
How very very odd. Seems like it requires a
belt and suspenders.
function destroyRows(rowArray:Array){
for (var i=0;i<rowArray.length;i++){
Echo.info("child index:"+panel.getChildIndex(rowArray[i]));
panel.destroyChild(rowArray[i]);
panel.destroyChildAt(panel.getChildIndex(rowArray[i]));
Echo.info("child index:"+panel.getChildIndex(rowArray[i]));
}
}
At 01:19 PM 5/5/2005, Jeff Tapper wrote:
>Hey folks -
>
>I'm having a hard time getting rid of a pesky
component. What should be a
>pretty straight forward operation is causing
me no end of grief.
>
>Running this code
>Echo.info("child
index:"+panel.getChildIndex(rowArray[i]));
>panel.destroyChild(rowArray[i]);
>Echo.info("child index:"+panel.getChildIndex(rowArray[i]));
>
>I see the child in question is at an index of
7 before i destroy, and still
>there after I destroy it. And, I still
see it in the interface. Any one
>see anything obviously wrong?
>
>
>
>----------
>Yahoo! Groups Links
> * To visit your group on
the web, go to:
> *
> <http://groups.yahoo.com/group/flexcoders/>http://groups.yahoo.com/group/flexcoders/
>
> *
> * To unsubscribe from this
group, send an email to:
> *
>
<mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]
>
> *
> * Your use of Yahoo! Groups
is subject to the
> <http://docs.yahoo.com/info/terms/>Yahoo!
Terms of Service.
Yahoo! Groups Links
|