How do I create a new arraycollection that can generate a unique variable name?
Like:
AC+nu as in AC1:ArrayCollection
AC+nu as 开发者_运维技巧in AC2:ArrayCollection
AC+nu as in AC3:ArrayCollection
AC+nu as in AC4:ArrayCollection
nu++;
I think you want:
var ac1:ArrayCollection = new ArrayCollection(sourceArrayCollection.list);
var ac2:ArrayCollection = new ArrayCollection(sourceArrayCollection.list);
Would you consider a super ArrayCollection to store all ArrayCollection you have. The ideal is like a two dimensional array.
var superDataCollection:ArrayCollection = new ArrayCollection();
var dc:ArrayCollection = new ArrayCollection();
var di:Object = new Object();
di.label1 = "Test";
di.label2 = "Test2";
dc.addItem(di);
superDataCollection.addItem(dc);
myDG.dataProvider = superDataCollection[0];
精彩评论