[flexcoders] Changing Parents
I have an image viewer that I would like to go full screen. I now have my app taking up the full screen, but I need the image viewer window to become the size of the app window. The image viewer is a child of a child of a child of the Application. I am calling application.addChild (imageViewer) to get this to go full screen, but when I want to go back to the normal view, I do a application.removeChild(imageViewer) and I want to add it back to the parent it had before. But that doesn't work. How can I change parents of a component without causing havoc?
Re: [flexcoders] Changing Parents
I did this recently, and it didn't cause havoc. What are seeing that goes wrong? I had two issues that I did needed to fix. One is that you have to remember to remove the child from the stage before adding it back to the application. The second is that the bindings were reexecuted when added back to the application, which I worked around by checking for the same value in the places I was observing bindings. -Brian On Thu, Aug 7, 2008 at 11:53 AM, wwwpl [EMAIL PROTECTED] wrote: I have an image viewer that I would like to go full screen. I now have my app taking up the full screen, but I need the image viewer window to become the size of the app window. The image viewer is a child of a child of a child of the Application. I am calling application.addChild (imageViewer) to get this to go full screen, but when I want to go back to the normal view, I do a application.removeChild(imageViewer) and I want to add it back to the parent it had before. But that doesn't work. How can I change parents of a component without causing havoc?
[flexcoders] Changing parents throught Drag Drop
Hey guys, Here's the scenario... I have a list of things displayed in a Tree. You can drag one of them, and drop it in a Container. The Container is in charge of creating what the dragged object specifies, generally an UIComponent. If the object is dropped inside a Container, it succesfully sets the right parent for the object. Once the component is created, it can still be dragged around. The problem is, once i've created the object and the parent has been set, if the object is dropped on other Container the parent property doesn't change, it's always dropped on the Container it was initially dropped. Every Container object has dragEnter and dragDrop handlers. The drag drop is done using the DragManager. Why can't I change parents on drag drop?
RE: [flexcoders] Changing parents throught Drag Drop
Can you share a code sample? Without taking a look at what you are doing. we could be just shooting blindly at what the problem is. First thing is first - are you removing the child from its present container and then re-adding it to the new target? The drag manager doesn't by default handle those kinds of things. Rick Winscot From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Sent: Saturday, May 17, 2008 12:30 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Changing parents throught Drag Drop Hey guys, Here's the scenario... I have a list of things displayed in a Tree. You can drag one of them, and drop it in a Container. The Container is in charge of creating what the dragged object specifies, generally an UIComponent. If the object is dropped inside a Container, it succesfully sets the right parent for the object. Once the component is created, it can still be dragged around. The problem is, once i've created the object and the parent has been set, if the object is dropped on other Container the parent property doesn't change, it's always dropped on the Container it was initially dropped. Every Container object has dragEnter and dragDrop handlers. The drag drop is done using the DragManager. Why can't I change parents on drag drop?