var listDataProvider:ArrayList = new ArrayList();
or something like this
No i think your miss understanding- that removing items from a vector - your not suppose to remove items.
The code I have which is really wrong is:
public var itemList:ArrayCollection = new ArrayCollection(
characterInventory = cc.pushInventory()
for(var i:int = 0; i < characterInventory.length; i++)
where characterInventory is a vector of type items (holding many items) which is populated by cc.pushInventory - a method that pushes the inventory to the UI level
Maybe you need to exmplain further. As I understand you have data inside a vector. And you need to display it inside a List as in halo list (<mx:List/>) or sparks list (<s:List/>). For this you need to put it inside and ArrayList/ArrayCollection. Both of them work with arrays and not vectors. What am I missing?
the exaplaining of how to take a vector of some type containing items, get out a specific item and populate a list (spark).
I dont know how to do this
So you have a vector of vectors? Like a matrix?
I have a class which contains getters and setters called CharacterInventory. (This getter and setter can set things like weapons, armor and items)
I have a vector as such: characterItems:Vector.<CharacterInventory>;
I know how to pull all the items of that vector out by doing: characterItems[i].getItem(); //retrieves all the items in the vector
What I need to do now is populat a data list with these items.
If a user clicks on an item in the list it should THEN splice it out by calling a spereate method which I have created.
I have been reading: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/DropDo wnList.html#includeExamplesSummary but cannot seem to modify it to do what I want.
Hopw do you bind avector of items to a lits which is created by arrays?