> What I'm realising is that children are ALL created, in a sequential
> fashion, but CREATED in fact. Why is this happening? Should I set a
> creationPolicy property to "none" and then instantiate the views
> manually? If so, which is the best way to do it? createComponent()?
> createChild()? createClassObject()?
If you set creationPolicy to "none", you can create each child on your
own using the 'createComponentFromDescriptor' method.
Example from the docs:
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
public function doSomething():void {
myVBox.createComponentFromDescriptor
(myVBox.childDescriptors[0],false);
myVBox.createComponentFromDescriptor
(myVBox.childDescriptors[1],false);
myVBox.createComponentFromDescriptor
(myVBox.childDescriptors[2],false);
}
</mx:Script>
<mx:VBox id="myVBox" height="100" width="125" creationPolicy="none">
<mx:Button id="b1" label="Click Me"/>
<mx:Button id="b2" label="Click Me"/>
<mx:Button id="b3" label="Click Me"/>
</mx:VBox>
<mx:Button label="Create Other Buttons" click="doSomething()"/>
</mx:Application>
Manish
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Web site design development | Computer software development | Software design and development |
Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.