Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Highlighted
Developer
Posts: 63
Registered: ‎12-10-2012
My Device: Blackberry 9900
My Carrier: Vodafone-in

get data from dynamically created textinputs

[ Edited ]

Hai am having some dynamically generated textinputs i need to get values on button click 

Currently am having 2 issues

     1. get data from dynamically created textinputs on button click

     2. cannt scroll the dynamic container

This is how I add textinputs dynamically on button click

private function onAddButtonClick(event:MouseEvent):void
		{
			var subContainer:Container = new Container();			
			subContainer.width = 768;
			subContainer.height = 500;
			
			subLayout = new GridLayout(2);			
			subLayout.numColumns = 2;
			subLayout.hSpacing = 100;
			subLayout.vSpacing = 20;			
			
			textinput = new TextInput();		
			
			var deleteImage:Image = new Image();
			deleteImage.setImage("images/aboutIconblack.png");			
			deleteImage.addEventListener(MouseEvent.CLICK, onDeleteImageClick);
			
			subContainer.addChild(tiput);
			subContainer.addChild(deleteImage);
			subContainer.layout = subLayout;
			mainContainerDTL.addChild(subContainer);
		
			function onDeleteImageClick(event:MouseEvent):void
			{
				trace(subContainer.numChildren);
				mainContainerDTL.removeChild(subContainer);
				
			}
		}

 how to get values from text inputs. When i try to get value I oly get the value/data from last created textinput

 

Any help is appreciated

Thanks in Advance :-)

 

 

_______________________________________________________
Help is available everywhere but you have to look at the correct place.
By Me :-)
Trusted Contributor
Posts: 110
Registered: ‎03-07-2013
My Device: -
My Carrier: -

Re: get data from dynamically created textinputs

I'd suggest pushing those textInputs into an array. Something like this:

 

private var allTextInputs:Array = new Array();

private function onAddButtonClick(event:MouseEvent):void

{

//..blabla

allTextInputs.push(textInput);

}