2 Replies Latest reply on Jun 11, 2011 9:15 PM by Adrien.

    Place the items in a vector into a interactivelist?

    Adrien. Level 1

      I have a vector of such:

       

      item:Vector.<items>;

       

      This vector contains:

       

      apple, banana, pear, pear, pear, peach, hello, six

       

      I want to take all the items by the name of pear and place it into a list where the user can click on it.

       

      so the list should look like:

       

      pear

      pear

      pear

       

      Upon clicking on it, it will then say : "ok the item you cliked is pear" it will then pass that to a method that will remove that pear from the item vector by splicing it out at the apparopriate location.

       

      an example using that list - if they click on the iddle pear it will then update - the next time they load that list - to show pear, pear.

      the vector will show apple, banana, pear, pear, peach, hello, six.

       

      I have the method down that will do this - How ever How do I populate a list using a vector when most lists are arraylists and how do I take the object they clicked on and pass it into a method to be dealt with accordingly?