// initLocator.selectedPhase是一个ArrayCollection对象实例
// phaseList是一个List对象实例
// 赋值失败
initLocator.selectedPhase = ArrayCollection(phaseList.selectedItems);
// 赋值失败
initLocator.selectedPhase = phaseList.selectedItems as ArrayCollection;
// 赋值成功
initLocator.selectedPhase = new ArrayCollection(phaseList.selectedItems);
List.selectedItems 和 ArrayCollection 之间的转换
ArrayCollection使用技巧
最新推荐文章于 2023-03-11 16:10:31 发布
本文探讨了ArrayCollection对象的正确使用方法。重点介绍了如何从List对象的selectedItems属性中正确创建ArrayCollection实例。通过示例对比了不同赋值方式的效果,强调了使用newArrayCollection构造函数的重要性。
1448

被折叠的 条评论
为什么被折叠?



