I had to build a dynamic form from a database not so long ago. There is
a whole lot more to it but I have boiled it down to the basic
functionality. The form component itself (MyForm.as) connects to the
database and grabs all the data to build the form dynamically. I have
not included any of that c
2008 5:35 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: getChildByName using it to get the value of a
textbox
Yes i tried that and while it loops it doesnt give KEY what i need
example
for (var key:String in dynamicallyCreatedComponents){
var t:TextInput = dynamicallyCreatedCom
ups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Jason B
> Sent: Wednesday, August 20, 2008 11:09 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: getChildByName using it to get the value of a
> textbox
>
>
>
> Can i loop through the items in that object
>
;
> From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
[mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
] On
> Behalf Of Jason B
> Sent: Tuesday, August 19, 2008 7:38 AM
> To: flexcoders@yahoogroups.com <mailto:flexcoders%40
> >
> > There will be plenty examples available.
> >
> >
> >
> > Tracy
> >
> >
> >
> > ____________
> >
> > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> [mail
is this what you mean i've tried to access but i still get a #1009 error
public var dynamicallyCreatedComponents:Object = {};
public function loaditems(){
create_text = new TextInput();
create_text.percentWidth = 100;
[EMAIL PROTECTED] On
Behalf Of Jason B
Sent: Tuesday, August 19, 2008 7:38 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: getChildByName using it to get the value of a
textbox
thanks Tracy could you provide an example of how this is done,
examples always help others out, or tell me
will be plenty examples available.
>
>
>
> Tracy
>
>
>
>
>
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Jason B
> Sent: Monday, August 18, 2008 5:47 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders]
on Smith
Adobe Flex SDK Team
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Luke Vanderfluit
Sent: Monday, August 18, 2008 3:25 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: getChildByName using it to get the value
of
Hi.
I wrote a getChildById function for this purpose/use case...
I create the grid and its children dynamically at runtime and give the
DisplayObjects
numerical ids.
Its one thing you miss in flex if you're used to using getElementById in
javascript.
So... this is container specific... I have
.
Tracy
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jason B
Sent: Monday, August 18, 2008 5:47 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: getChildByName using it to get the value of a
textbox
Because the items are
Because the items are not in MXML its in actionscript which
dynamically creates the items for my form from a database and i want
to dynamically loop the text box's so i can then save the data back to
the database.
you cant refer to a ID since the components are created at runtime
--- In flexcode
Yes your code works since its not dynamically building the form but what
happens if you try this code...it gets an error like i do
http://www.adobe.com/2006/mxml";
layout="vertical" horizontalAlign="left" creationComplete="loaditem()" >
--- In flexcoders@yahoogroups.com, Nik Derewia
That #1009 error means that it returned a null from the first line
because it couldn't find the child with that name. getChildByName is
not recursive so you need to be mindful of the nesting of your
requested object.
The following app has the functionality working as you need it, but it
Thanks a lot for the reply...
turns out i get an error 1009 when i try to something as simple as an
alert
var test:TextInput = TextInput(this.getChildByName("inputtext" + a));
Alert.show(test.text.toString());
--- In flexcoders@yahoogroups.com, Nik Derewianka <[EMAIL PROTECTED
15 matches
Mail list logo