Hi, Don't quote me but,
I think it has to do that you do not have a parent on your main VBox instance. I don't think createComponentsFromDescriptors() is called until parentChanged() or something is called (IE the parent VBox actually has a parent). This shouldn't be a problem, the timing of invalidation gives you plenty of time to initialize your children when they are finally added to the display list of the stage. Peace, Mike On 4/30/07, bhaq1972 <[EMAIL PROTECTED]> wrote:
This question is very similar to a question someone else is asking (may even be the same thing????) I've got a component called MyPrintView.mxml <mx:VBox> <mx:Label id="contact"/> <mx:PrintDataGrid id="printDG"/> </mx:VBox> when i create an instance of MyPrintView, its children are not created. why is that? if you addChild() to the Application....they are created. why is that? <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" initialize="startUP()"> <mx:Script> <![CDATA[ private function startUP():void { var printView:MyPrintView = new MyPrintView(); trace(printView); trace(printView.printDG, printView.contact); //both null addChild(printView); trace(printView.printDG, printView.contact); //both not null } ]]> </mx:Script> </mx:Application>
-- Teoti Graphix http://www.teotigraphix.com Blog - Flex2Components http://www.flex2components.com You can find more by solving the problem then by 'asking the question'.

