开发者

arraycollection unique var

开发者 https://www.devze.com 2023-03-04 04:24 出处:网络
How do I create a new arraycollection that can generate a unique variable name? Like: AC+nu as in AC1:ArrayCollection

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];
0

精彩评论

暂无评论...
验证码 换一张
取 消