Your code should work fine. I do this all the time. In all likelihood there is another error in your code.
What is the error? Is it a null reference of some kind? if so, have you tracked down what is null and why? Maybe some judicial use of callLater will help. --- In flexcoders@yahoogroups.com, "normc_actionscript" <normcousin...@...> wrote: > > Is it possible/advisable to add an mxml component to the application by doing > this from a Flex container: > var myComp:myCustomPanel = new myCustomPanel(); > // myCustomPanel is myCustomPanel.mxml containing a Panel container. > AddChild(myComp) > > On creation complete of myCustomPanel.mxml I attempt to set text in a > <mx:TextField> sub component, but error occurs at runtime. > > Any other suggestions on how to pop up panels in the application? > Popup manager? > Include them on application startup and toggle visibility? > > Thanks, > Norm C. >