Hi guys i have a list control in a component mxml file. I have created a function in main mxml file, i want to input a text string and add it to this list. How can i do that. Currently using this code
public function add(event:MouseEvent):void
{
var name:String = mytextinputid.text;
currentState = 'ChatScreen';
mylist.____
}
Note that this function is in main and the mylist list control is in component mxml
Best regards
If you have assigned an id to your component, which I assume is mylist, you simply call
You should always have a
dataProviderset to myList. Or else you can set one at run time.OR you can specify a
dataProviderfrom MXML