Hi,
I am creating a list such as follows
var ls:List = new List();
ls.addItem({label:"Apple"});
ls.addItem({label:"Pear"})
ls.addItem({label:"Banana"})
ls.addItem({label:"Grapes"})
addChild(ls);
var btn:Button = new Button();
addChild(btn);
btn.x = 10 + btn.width;
btn.label ="Remove"
btn.addEventListener(MouseEvent.CLICK,onRemoveClick)
function onRemoveClick(e:MouseEvent):void
{
ls.removeItem(ls.selectedItem);
}
what can i do so that when i click the remove button, the console returns trace statement that prints out all the items that werent removed from the list