Clint,

 

            Can you post your mxml here? Setting the creationPolicy to queued on the Panels will create the panel container and queue up the creation of its children components. The thing that triggers the children to be created is the Application’s creationComplete event. Once we receive this event, we proceed to create the components in the creation queue.

 

            It is not necessary to specify creationIndex. You don’t want to set the creationPolicy on the Canvas to queued.

 

In the following example, you see that the HBox is created when the application starts up. At a later time, the children of the container (the Button), get created.

 

 

<mx:HBox label="HBox1" creationPolicy="queued"  borderStyle="solid" width="100%">
   <mx:Button label="Box 1"  creationComplete="output.text += 'box3 created' + '\n'" />
</mx:HBox>

 

Here’s a link to an article I wrote on the subject: http://www.macromedia.com/devnet/flex/articles/prog_layout.html

 

Jason

 

 

 


From: [email protected] [mailto:[email protected]] On Behalf Of Clint Modien
Sent: Tuesday, June 28, 2005 5:44 AM
To: [email protected]
Subject: Re: [flexcoders] can someone explain creationPolicy="queued"

 

Hey Matt... thanks for taking the time...

First I tried the parent...

Then I tried setting each of the panels (the children)...

On each one I tried setting creationIndex incrementally on each control that I had just set creationIndex....

And I couldn't get it to draw properly... either the controls weren't created @ all... or they were created but the children weren't...

I found this simple example in the docs...

<?xml version="1.0" ?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">   
    <mx:VBox id="accord" width="300" height="200" creationPolicy="queued">
        <mx:HBox label="HBox1"  creationPolicy="queued" creationIndex="3" borderStyle="solid" width="100%">
            <mx:Button label="Box 1" creationComplete="output.text += 'box1 created' + '\n'"/>
        </mx:HBox>
        <mx:HBox label="HBox2"  creationPolicy="queued" creationIndex="2" borderStyle="solid" width="100%">
            <mx:Button label="Box 2" creationComplete="output.text += 'box2 created' + '\n'"/>
        </mx:HBox>
        <mx:HBox label="HBox3" creationPolicy="queued" creationIndex="1" borderStyle="solid" width="100%">
            <mx:Button label="Box 3"  creationComplete="output.text += 'box3 created' + '\n'" />
        </mx:HBox>
    </mx:VBox>
    <mx:TextArea id="output" width="200" height="200" />   
</mx:Application>

Does this mean that I have to wrap whatever I want to be created in order in a "Container" subclass like an HBox?

On 6/28/05, Matt Chotin <[EMAIL PROTECTED]> wrote:

You set each of the Panels to creationPolicy="queued" or just the parent Canvas?  I think you want to set just the Canvas and not set any of the others.  Have you given any of the Panels a creationIndex?  I'm not sure if it's required to have an index or if it will work automatically without.  Maybe if any of them have an index all of them need it?

 

Matt

 


From: [email protected] [mailto:[email protected]] On Behalf Of Clint Modien
Sent: Monday, June 27, 2005 6:57 PM
To: [email protected]
Subject: [flexcoders] can someone explain creationPolicy="queued"

 

I thought the concept seemed pretty straightforward to me...

According to the docs... setting the parent container's creationPolicy to queued should create its children in a queued manner.

When i set my containers (which are subclassed panel components by the way ) creationPolicy="queued" they don't create their child components @ all... (very frustrating)


When I set the parents (a Canvas) creationPolicy to queued, (of the panels i just mentioned)  the panels don't get created one @ a time

I'm really confused by the whole experience...




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com


YAHOO! GROUPS LINKS

 

 





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to