Re: [flexcoders] swap Children?

2007-04-12 Thread Matt Wicks
PROTECTED] Subject: Re: [flexcoders] swap Children? Thanks for this - still doesn't work though ... driving me mad matt On 11 Apr 2007, at 12:44, Ciarán wrote: Hi Matt, Sounds like there's a problem with flex updating the screen before the children are swapped properly. Try validating

[flexcoders] swap Children?

2007-04-11 Thread Matt Wicks
Hi there all, bit of a puzzle I'm having and would be grateful for some help... container is a displayObjectContainer and objectToMove is a Display object var ind:int = container.getChildIndex(objectToMove)

Re: [flexcoders] swap Children?

2007-04-11 Thread Ciarán
Hi Matt, Sounds like there's a problem with flex updating the screen before the children are swapped properly. Try validating the component after the call to swap the children, and catching any exception thrown. try { container.swapChildrenAt(ind,1); container.validateNow(); } catch

Re: [flexcoders] swap Children?

2007-04-11 Thread Matt Wicks
Thanks for this - still doesn't work though ... driving me mad matt On 11 Apr 2007, at 12:44, Ciarán wrote: Hi Matt, Sounds like there's a problem with flex updating the screen before the children are swapped properly. Try validating the component after the call to swap the children, and

Re: [flexcoders] swap Children?

2007-04-11 Thread Daniel Freiman
check the pieces of the code. What I mean by that is try: var child1 = container.getChildAt(ind); var child2 = container.getChildAt(1); container.setChildIndex(child1,1) container.setChildIndex(child2,ind); see specifically which line is breaking. - Daniel Freiman nondocs?

RE: [flexcoders] swap Children?

2007-04-11 Thread Gordon Smith
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt Wicks Sent: Wednesday, April 11, 2007 5:39 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] swap Children? Thanks for this - still doesn't work though ... driving me mad