如何在 Flex 中检查 XMLList 是否为空
如果我在 Flex 中有一个 XMLList 对象,检查列表是否为空的正确方法是什么?我应该只比较 myList.length() > 的结果吗? 0、myList.toString() != ""
还是完全尝试其他方法?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会选择简单的
myList.length() > 0 方法。
您可以在 ECMAScript for XML (E4X) 规范(第 104 页),Actionscript 实现该规范。
I would go with the simple
myList.length() > 0
method.You can see an example of the
length()
function in the ECMAScript for XML (E4X) specification (page 104), which Actionscript implements.