简体   繁体   English

Flex3-动作脚本:如何捕获对象数组的空白

[英]Flex3 - action script : How to capture the emptyness of an Array of Object

I would like to know when an Array of objects is empty (or not). 我想知道对象数组何时为空(或不是)。

I tried using the ObjectProxy as follow: 我尝试使用ObjectProxy如下:

myArrayProxy=new ObjectProxy(myArray);
myArrayProxy.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, changeArrayHandler)

But the event is not fired when the object's content change. 但是,当对象的内容更改时,不会触发该事件。

Any idea on how to solve this? 关于如何解决这个问题的任何想法?

Thanks 谢谢

您可以使用ArrayCollection并侦听collectionChange事件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM