`
michaeltangbin
  • 浏览: 268082 次
  • 性别: Icon_minigender_1
  • 来自: 黑龙江省
社区版块
存档分类
最新评论

ArrayCollection更新单个对象数据

阅读更多

初始化ArrayCollection

 

 private var expensesAC:ArrayCollection = new ArrayCollection( [
            { Month: "Jan", Profit: 2000, Expenses: 1500, Amount: 450 },
            { Month: "Feb", Profit: 1000, Expenses: 200, Amount: 600 },
            { Month: "Mar", Profit: 1500, Expenses: 500, Amount: 300 },
            { Month: "Apr", Profit: 1800, Expenses: 1200, Amount: 900 },
            { Month: "May", Profit: 2400, Expenses: 575, Amount: 500 } ]);

 

更改ArrayCollection

 

  private function change():void
        {
        	
	expensesAC[0].Profit=100;
	expensesAC[0].Amount=100;
	expensesAC.itemUpdated(expensesAC[0]);//更新完成后生效			

        }

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics