 
 import flash.display.DisplayObject;
 import flash.display.DisplayObjectContainer;
-import mx.containers.ApplicationControlBar;
-import mx.containers.ControlBar;
-import mx.containers.Panel;
-import mx.core.Application;
 import mx.core.ContainerCreationPolicy;
 import mx.core.IDeferredInstance;
 import mx.core.mx_internal;

            case "lastChild":
            default:
            {
                // Hopefully this is a temporary fix for SDK-9478. If the child is a ControlBar,
                // it needs to be removed from the rawChildren list.
                // This should be changed when we get a proper API for adding/removing a ControlBar
                if (target is ControlBar && obj is Panel)
                {
                    Panel(obj).rawChildren.removeChild(target);
                    Panel(obj).createComponentsFromDescriptors();
                }
                else if (target is ApplicationControlBar && ApplicationControlBar(target).dock)
                {
                    Application(obj).dockControlBar(ApplicationControlBar(target), false);
                    Application(obj).removeChild(target);
                }
                else if (obj == target.parent)
                {
                    obj.removeChild(target);
                }

            default:
            {
                obj.addChild(target);
                break;
            }
        }
