Re: Dynamically add Objects to BoxPane
- I've found a work around by setting the configuration property to null after a store in my temporary variable.
var config:Array = bp.configuration;
bp.configuration = null;
--- In firstname.lastname@example.org, "sramsey216" <sramsey216@...> wrote:
> I am trying to dynamically add objects to a BoxPane by updating the BoxPane's configuration property. Here is my code:
> public function addChildToPane(pane:String, object:Object):void
> var bp:BoxPane = this.getChildByName(pane) as BoxPane;
> if (bp)
> var config:Array = bp.configuration;
> if (!config)
> config = new Array();
> bp.configuration = config;
> I am getting the following error: [Fault] exception, information=ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
> Has anyone successfully added object dynamically?