进行flex开发时,需要用到sqlite对数据进行存储以及查询。
现阶段把sqlite的创建,链接,查询,更新等操作都做成了一个共通类。
然后在view中把这个共通sqlite.as给引进来了。
 在view中调用selectall这个操作,报下面这个错误Error #1009: Cannot access a property or method of a null object reference.
PS:目的,想通过selectall把数据库中的数据全部取出来,放到页面上的list组件中显示出来。请各位大侠,给予指点FlexSQLite

解决方案 »

  1.   

    最终决定,不通过调用共通。。
    直接在当前view中创建数据库,进行查询
    通过下面的方法来实现
    <fx:Declarations>
    <s:ArrayCollection id="test"/>
    </fx:Declarations>
    <s:List id="list" width="100%" height="100%" dataProvider="{test}" click="clickHandler(event)">
    <s:itemRenderer>
    <fx:Component>
    <s:IconItemRenderer  labelField="filmname" iconWidth="80" iconHeight="80" iconField="picture" messageField="summary"/>
    </fx:Component>
    </s:itemRenderer>

    </s:List>