更新ArrayCollection中的某一项可使用itemUpdated。
API:
itemUpdated()方法
public function itemUpdated(item:Object, property:Object = null, oldValue:Object = null, newValue:Object = null):void
通知视图,某个项目已更新。如果视图的内容不实现 IPropertyChangeNotifier,则此方法非常有用。如果对此方法的调用包括 property 参数,则视图可以优化其通知机制。否则,它可能选择仅刷新整个视图。
参数
item:Object — 已在视图中更新的项目。
property:Object (default = null) — 已更新属性的名称。
oldValue:Object (default = null) — 该属性的旧值。(如果属性为 null,则它可以是该项目的旧值。)
newValue:Object (default = null) — 该属性的新值。(如果属性为 null,则无需指定它,因为已假定该项目为新值。)