flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Subscriptions <subscripti...@leeburrows.com>
Subject Re: How do I to access data from objects created with addElement ?
Date Fri, 01 Aug 2014 16:15:23 GMT
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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message