RE: [flexcoders] Dynamic controls
I know this is old, but I'm catching up on flexcoders... You usually want to call createChild() instead of createClassObject(). createChild() is for creating "content children" inside of containers. The dynamically created children contribute to the numChildren count, can be accessed via getChildAt(), and participate in the container's layout algorithm. createClassObject() is for creating "non-content children". For example, Flex containers use it to create their border and scrollbars, which are child MovieClips but which don't count in numChildren, can't be accessed via getChildAt(), and don't participate in layout. It is also how Flex controls create their internal pieces; for example, a NumericStepper uses createClassObject() to create its increment and decrement buttons. - Gordon -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Aldo Bucchi Sent: Thursday, August 04, 2005 1:03 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Dynamic controls Agha, Parse the array and instantiate controls dynamically ( with actioncript ) mx.core.UIObject.createClassObject( classRef: Function, name: String, depth: Number, initObj: Object) : mx.core.UIObject On 8/4/05, Matt Chotin <[EMAIL PROTECTED]> wrote: > > > > I'm not sure what your question is. This kind of data looks like it'd work > well inside a DataGrid. So you can just create the grid and set this as > your dataProvider, no? > > > > > > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of Mehdi, Agha > Sent: Wednesday, August 03, 2005 9:38 AM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Dynamic controls > > > > > Hi, > > I need suggestions to implement generating dynamic controls. Here's the > scenario. > > From CF, I get the following. > > Array[0]["Struct Element"][0]["name"] = "abc" > > Array[0][" Struct Element"][0]["value"] = "def" > > Array[0][" Struct Element"][0]["label"] = "ghi" > > Array[0][" Struct Element"][0]["Parent"] = "Struct Element" > > Array[0][" Struct Element"][0]["controlType"] = "Slider" > > Array[0][" Struct Element"][0]["minValue"] = "2" > > Array[0][" Struct Element"][0]["maxValue"] = "18" > > Array[0][" Struct Element"][0]["interval"] = "2" > > Array[1]["Struct Element2"][0]["name"] = "abc" > > Array[1][" Struct Element2"][0]["value"] = "def" > > Array[1][" Struct Element2"][0]["label"] = "ghi" > > Array[1][" Struct Element2"][0]["Parent"] = "Struct Element2" > > Array[1][" Struct Element2"][0]["controlType"] = "CheckBox" > > Array[1][" Struct Element2"][0]["minValue"] = "" > > Array[1][" Struct Element2"][0]["maxValue"] = "" > > Array[1][" Struct Element2"][0]["interval"] = "" > > What is the best way to build UI in Flex with this kind of data. > > Thanks > > Agha Mehdi > > IDT - eBusiness Program Manager > > Work: 408.284.8239 > > Fax: 408.284.2766 > > > > > -- > 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 > Computer software testing Macromedia flex Development > Software developer > > > 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. > > > -- : Aldo Bucchi : mobile (56) 8 429 8300 -- 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 Yahoo! Groups Sponsor ~--> http://us.ard.yahoo.com/SIG=12hipniai/M=362131.6882499.7825260.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1124783985/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org ">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life - brought to you by One Economy. ~-> -- 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 <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Dynamic controls
Agha, Parse the array and instantiate controls dynamically ( with actioncript ) mx.core.UIObject.createClassObject( classRef: Function, name: String, depth: Number, initObj: Object) : mx.core.UIObject On 8/4/05, Matt Chotin <[EMAIL PROTECTED]> wrote: > > > > I'm not sure what your question is. This kind of data looks like it'd work > well inside a DataGrid. So you can just create the grid and set this as > your dataProvider, no? > > > > > > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of Mehdi, Agha > Sent: Wednesday, August 03, 2005 9:38 AM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Dynamic controls > > > > > Hi, > > I need suggestions to implement generating dynamic controls. Here's the > scenario. > > From CF, I get the following. > > Array[0]["Struct Element"][0]["name"] = "abc" > > Array[0][" Struct Element"][0]["value"] = "def" > > Array[0][" Struct Element"][0]["label"] = "ghi" > > Array[0][" Struct Element"][0]["Parent"] = "Struct Element" > > Array[0][" Struct Element"][0]["controlType"] = "Slider" > > Array[0][" Struct Element"][0]["minValue"] = "2" > > Array[0][" Struct Element"][0]["maxValue"] = "18" > > Array[0][" Struct Element"][0]["interval"] = "2" > > Array[1]["Struct Element2"][0]["name"] = "abc" > > Array[1][" Struct Element2"][0]["value"] = "def" > > Array[1][" Struct Element2"][0]["label"] = "ghi" > > Array[1][" Struct Element2"][0]["Parent"] = "Struct Element2" > > Array[1][" Struct Element2"][0]["controlType"] = "CheckBox" > > Array[1][" Struct Element2"][0]["minValue"] = "" > > Array[1][" Struct Element2"][0]["maxValue"] = "" > > Array[1][" Struct Element2"][0]["interval"] = "" > > What is the best way to build UI in Flex with this kind of data. > > Thanks > > Agha Mehdi > > IDT - eBusiness Program Manager > > Work: 408.284.8239 > > Fax: 408.284.2766 > > > > > -- > 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 > Computer software testing Macromedia flex Development > Software developer > > > 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. > > > -- : Aldo Bucchi : mobile (56) 8 429 8300 Yahoo! Groups Sponsor ~--> http://us.ard.yahoo.com/SIG=12h58d5ff/M=362335.6886445.7839731.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1123193005/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/";>In low income neighborhoods, 84% do not own computers. At Network for Good, help bridge the Digital Divide!. ~-> -- 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 <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
RE: [flexcoders] Dynamic controls
Title: Dynamic controls I’m not sure what your question is. This kind of data looks like it’d work well inside a DataGrid. So you can just create the grid and set this as your dataProvider, no? From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Mehdi, Agha Sent: Wednesday, August 03, 2005 9:38 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Dynamic controls Hi, I need suggestions to implement generating dynamic controls. Here's the scenario. From CF, I get the following. Array[0]["Struct Element"][0]["name"] = "abc" Array[0][" Struct Element"][0]["value"] = "def" Array[0][" Struct Element"][0]["label"] = "ghi" Array[0][" Struct Element"][0]["Parent"] = "Struct Element" Array[0][" Struct Element"][0]["controlType"] = "Slider" Array[0][" Struct Element"][0]["minValue"] = "2" Array[0][" Struct Element"][0]["maxValue"] = "18" Array[0][" Struct Element"][0]["interval"] = "2" Array[1]["Struct Element2"][0]["name"] = "abc" Array[1][" Struct Element2"][0]["value"] = "def" Array[1][" Struct Element2"][0]["label"] = "ghi" Array[1][" Struct Element2"][0]["Parent"] = "Struct Element2" Array[1][" Struct Element2"][0]["controlType"] = "CheckBox" Array[1][" Struct Element2"][0]["minValue"] = "" Array[1][" Struct Element2"][0]["maxValue"] = "" Array[1][" Struct Element2"][0]["interval"] = "" What is the best way to build UI in Flex with this kind of data. Thanks Agha Mehdi IDT - eBusiness Program Manager Work: 408.284.8239 Fax: 408.284.2766 -- 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 Computer software testing Macromedia flex Development Software developer 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.