[flexcoders] Re: getChildByName using it to get the value of a textbox

2008-09-02 Thread valdhor
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

RE: [flexcoders] Re: getChildByName using it to get the value of a textbox

2008-08-21 Thread Gordon Smith
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

[flexcoders] Re: getChildByName using it to get the value of a textbox

2008-08-21 Thread Jason B
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 >

RE: [flexcoders] Re: getChildByName using it to get the value of a textbox

2008-08-20 Thread Gordon Smith
; > 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

[flexcoders] Re: getChildByName using it to get the value of a textbox

2008-08-20 Thread Jason B
> > > > There will be plenty examples available. > > > > > > > > Tracy > > > > > > > > ____________ > > > > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > [mail

[flexcoders] Re: getChildByName using it to get the value of a textbox

2008-08-19 Thread Jason B
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;

RE: [flexcoders] Re: getChildByName using it to get the value of a textbox

2008-08-19 Thread Gordon Smith
[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

[flexcoders] Re: getChildByName using it to get the value of a textbox

2008-08-19 Thread Jason B
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]

RE: [flexcoders] Re: getChildByName using it to get the value of a textbox

2008-08-18 Thread Gordon Smith
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

Re: [flexcoders] Re: getChildByName using it to get the value of a textbox

2008-08-18 Thread Luke Vanderfluit
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

RE: [flexcoders] Re: getChildByName using it to get the value of a textbox

2008-08-18 Thread Tracy Spratt
. 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

[flexcoders] Re: getChildByName using it to get the value of a textbox

2008-08-18 Thread Jason B
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

[flexcoders] Re: getChildByName using it to get the value of a textbox

2008-08-18 Thread Jason B
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

Re: [flexcoders] Re: getChildByName using it to get the value of a textbox

2008-08-18 Thread Nik Derewianka
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

[flexcoders] Re: getChildByName using it to get the value of a textbox

2008-08-18 Thread Jason B
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