Assign it an ID and reference it through that? -Mark
-----Original Message----- From: Irnbru [mailto:[email protected]] Sent: Friday, August 01, 2014 11:49 AM To: [email protected] Subject: How do I to access data from objects created with addElement ? 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.
