try:

if (currentElement*is*  FormItem)



On 01/08/2014 16:48, Irnbru wrote:
So I have a very simple cutome component with two textInputs

I create these as needed dynamically using

siFormItem         = new FormItem(); // Add formItem
siFormAttrbt        = new lpSiComp(); // Custom Component
siFormItem.addElement(siFormAttrbt); // Add Custom component to formItem
siForm.addElement(siFormItem); // Add FormItem To form

Greate this works but now how do I get to the textinput data within the
CustomComponents

I get as far as

for (var i:int = 0; i < siForm.numElements; i++)
{
    var stringName:String = siForm.getElementAt(i) + "";
    var currentElement:IVisualElement = siForm.getElementAt(i);
                                        
    trace(currentElement);
                                        
    if (currentElement as FormItem)
    {
        trace ('Is a formItem');
    }
}
                                        



--
View this message in context: 
http://apache-flex-users.2333346.n4.nabble.com/How-do-I-to-access-data-from-objects-created-with-addElement-tp7446.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

--
Lee Burrows
ActionScripter

Reply via email to