This doesn't make the children get created at 'new' time.
 
- Gordon

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Yiðit 
Boyar
Sent: Monday, April 30, 2007 11:25 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] creating instances, addChild question



try setting creationPolicy="all" in your component


----- Original Message ----
From: bhaq1972 <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Monday, April 30, 2007 2:56:41 PM
Subject: [flexcoders] creating instances, addChild question



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 
<http://www.adobe.com/2006/mxml> " 
initialize=" startUP() ">

<mx:Script>
<![CDATA[
private function startUP():void
{
var printView:MyPrintVi ew = 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>





________________________________

Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos. 
<http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM->
  

 

Reply via email to