【问题标题】:is it possible to store few ArrayCollections inside a ArrayCollection or Array?是否可以在 ArrayCollection 或 Array 中存储少量 ArrayCollections?
【发布时间】:2013-12-18 08:34:15
【问题描述】:

实际上,我的意图是将动态生成的 ArrayCollections 存储在 ArrayCollection 或 Array 中或使用任何其他方法。这可能吗?

【问题讨论】:

    标签: actionscript-3 apache-flex flex4 flex3 flex4.5


    【解决方案1】:

    得到答案。使用相同的对象存储方法并不难。

    这是我的示例数组集合

    private var expenses:ArrayCollection = new ArrayCollection([
                {Label:"Taxes", Value:1001},
                {Label:"Rent", Value:1005},
                {Label:"Bills", Value:1008},
                {Label:"Car", Value:1009},
                {Label:"Gas", Value:1020},
                {Label:"Food", Value:1015},
                {Label:"Taxes1", Value:1080},
                {Label:"Rent1", Value:1200},
                {Label:"Bills1", Value:100} ,
                {Label:"Car1", Value:450},
                {Label:"Gas1", Value:100},
                {Label:"Food1", Value:1750},
                {Label:"Taxes2", Value:1275},
                {Label:"Rent2", Value:1650},
                {Label:"Bills2", Value:1220},
                {Label:"Car2", Value:1550},
                {Label:"Gas2", Value:900},
                {Label:"Food2", Value:850},
                {Label:"g", Value:900},
                {Label:"h", Value:850} 
            ]);
    

    这就是我在另一个 ArrayCollection 中存储费用 ArrayCollection 的方式

    var arr:ArrayCollection=new ArrayCollection();
    
                    var obj:Object=new Object();
    
                    obj.value=expenses;
    
                    arr.addItem(obj);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-08-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-08
      • 2021-12-18
      • 2012-04-04
      相关资源
      最近更新 更多