title: Problem accessing value of selected item in a list
body: <p>I'm having a problem with getting the value of an item that the user selects in my mobile Flex application.  When I select an item from the list I place that item into an ArrayCollection.  But when I check the value (trace()), the value is [object Object] and I can't seem to access the actual value of the object.  Here is what I am doing:</p>
  
  <pre><code>private var selectedPlayers:ArrayCollection = new ArrayCollection();
              private var numOfPlayers:int;
  ...
  
  //check if item is not already in selected players list
                  if(!selectedPlayers.contains(playerList.selectedItem))
                  {
  
                      //add the selected item to the selected players list
                      selectedPlayers.addItem(playerList.selectedItem);
                      numOfPlayers++;
                      trace("selected Players: " + selectedPlayers);
  
                  }
  </code></pre>
  
  <p>output from trace():</p>
  
  <p>selected Players: [object Object]</p>
  
  <p>Thank you very much for any advice and insight.</p>
  
  <p>UPDATE: Here's the working code:</p>
  
  <pre><code>[Bindable]
              public static var selectedPlayers:ArrayCollection = new ArrayCollection([
                  {Name: "testname" }]);
  
  ...
  
  //check if item is not already in selected players list
                  if(!selectedPlayers.contains(playerList.selectedItem.PName))
                  {
                      //add the selected item to the selected players list
                      selectedPlayers.addItem({Name: playerList.selectedItem.PName});
                      numOfPlayers++;
                  }
  </code></pre>