In the code for this article: http://blogs.adobe.com/aharui/2008/01/html_and_flex_1.html
Is logic that parses xml and instantiates various UI classes based on the xml. ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of mknuttall Sent: Friday, August 22, 2008 7:11 PM To: [email protected] Subject: [flexcoders] Re: Choosing Components Dynamically Thanks, I will. Hopefully it will allow different components within the repeater. --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , "Tracy Spratt" <[EMAIL PROTECTED]> wrote: > > Consider using mx:Repeater for this kind of thing. It will save you > lots of code and provide many other benefits over manually using > addChild(). > Tracy > > > --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , "mknuttall" <mknuttall@> wrote: > > > > I can deal with the verbosity and the components will > be "predesigned" > > and so available at compile time. Got any examples? > > > > > > --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , "Richard Rodseth" <rrodseth@> > wrote: > > > > > > You can certainly build a view dynamically, because any component > can be > > > instantiated in ActionScript. Depending how you structure things, > > the code > > > may become quite a bit more verbose than you are accustomed to. > > > > > > I believe there are some restrictions on "creation by name" in > > ActionScript, > > > but if the types of the components are known at compile time, a > simple > > > switch statement will do the trick. > > > > > > On Fri, Aug 22, 2008 at 2:32 PM, mknuttall <mknuttall@> wrote: > > > > > > > Has anyone or does anyone know if it is possible to choose > what > > > > component to display dynamically? For instance if one is > displaying a > > > > questionnaire, questions are Text, Yes No, List and Date and > are not > > > > know what they are or what the order is till runtime. > > > > > > > > > > > > > > > > > >

