I plus one the request for 'certain conditions'. You post alludes to the fact that you can't access the component by name, so I'm writing the rest of this based on that assumption.
To access the values of a component and pass parameters of that component into a function you need an identifier, or link, to that component. It is easiest if you use the components name. But, that is not always possible. For example, the Flextras Calendar component creates, and displays, the days of the month. Depending what month is displayed, there may be 28, 30, or 31 days. It is not practical to access them by a unique name.
this is a similar situation in a ListBased class. You won't know, at compile time, how many itemRenderers you're going to need or have on the screen at one time.
One way to approach this is to have an array of the relevant objects (dayRenderers, itemRenderers, or in your case TextInputs). When doing processing you can loop over the array and process the element. Something like this:
for (var x = 0; x<objectArray.length; x++){
foo(objectArray[x].text);
}
If that is not desirable to you, for whatever reason, you can loop over the children of a container doing something like this:
for (var x = 0; x<container.numChildren; x++){
var object : Object = this.getChildat(x);
if(object is TextInput){ foo(object.text) }
}
Functional, but it can be a bit tedious at times. It really depends what you're trying accomplish.