【发布时间】:2011-08-27 18:12:24
【问题描述】:
我目前正在使用最新版本的 Flash Builder 开发一个移动应用程序,我需要创建一个 Global ArrayCollection 来存储从本地数据库中提取的信息。我可以很好地从数据库中提取数据,但是当我尝试时我似乎无法访问全局变量。我有一个名为“Model.as”的 .as 文件,它位于一个名为 valueObjects 的文件夹中,该文件包含以下代码:
package valueObjects
{
import flash.data.SQLConnection;
import mx.collections.ArrayCollection;
public class Model
{
public var ids:ArrayCollection = new ArrayCollection();
public function Model()
{
}
}
}
现在我想开始使用数据库中的信息填充此 ArrayCollection,因此我将类导入到默认包 mxml 文档中,当应用程序启动时将首先加载该文档:
import valueObjects.Model;
然后在一个私有函数中,我尝试访问 ids ArrayCollection 并填充它,但是我收到以下错误:
-1120: Access of undefined property ids.
-Access of undefined property ids
有人可以帮忙吗?谢谢
【问题讨论】:
标签: android apache-flex flash-builder arraycollection