mx.collections 丢失? Flex4 (Flash Builder 4) 中的 ArrayCollection()
我有一些使用 ArrayCollection 的代码,它导入:
import mx.collections.ArrayCollection;
then:
static protected var myAC:ArrayCollection = new ArrayCollection();
看起来很简单,但在我的项目中,未找到/定义导入(以及 ArrayCollection)!
我正在使用 Flash Builder 4 (Flex 4) - 它是一个 ActionScript 项目,项目属性设置为 Flex SDK 4.0。一切都应该是默认设置。
当我输入“导入 mx”时。然后按 control-space(自动完成),我会看到一个选项列表,例如 core、geom 和其他几个选项,但没有“集合”。
我一定错过了什么?
I have some code that uses an ArrayCollection, it imports:
import mx.collections.ArrayCollection;
then:
static protected var myAC:ArrayCollection = new ArrayCollection();
Seems straightforward, but in my project the import (and thus ArrayCollection) are not found/defined!
I am using Flash Builder 4 (Flex 4) - it's an ActionScript project, and project properties is set to Flex SDK 4.0. Everything should be default settings.
When I type "import mx." and press control-space (autocomplete), I see a list of choices such as core, geom and several others, but no 'collections'.
I must be missing something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
默认情况下,“ActionScript 项目”不包含包含 mx.collections 等 Flex 包的 Framework.swc。如果您确实想使用 ArrayCollection,则必须将 SWC 及其相应的资源包 SWC 添加到项目库路径中。他们位于:
By default, an "ActionScript Project" does not include the framework.swc which contains the flex packages such as mx.collections. If you really want to use ArrayCollection, you'll have add the swc and its corresponding resource bundle swc to your project library path. They are located at: