Array Collection

The ability to manipulate the data is done using the concept of a *cursor*. A cursor is a position indicator, which allows direct access to any particular item in the collection. Among the controls you have with a cursor are methods for stepping from one item to the next; finding a particular item; adding, removing, or editing an item; etc. Cursors are available to any of the classes that implement ICursorView interface.

Before you can use a cursor on an array collection, the data in the collection needs to be sorted.

var prodSort:Sort = new Sort();
var sortField1:SortField = new SortField("catID");
var sortField2:SortField = new SortField("listPrice");
prodSort.fields = new Array (sortField1, sortField2);
myArrayCollection.sort = prodSort;

Extending ArrayCollection

en/computers/lg/actionscript/actionscript-3/data/collections/arraycollection.txt · Last modified: 2008/09/23 20:07 by marielle
RSS - Banner by widged, template © 7throot HeadQuarters, 2007