在这里,我想在从 sqlite 数据库中获取的列表中显示多个项目:
一键点击我调用列表功能:
protected function showrecord_clickHandler(event:MouseEvent):void
{
// TODO Auto-generated method stub
fetchfalseanswerquestion();
}
从 sqlite 数据库中获取数据的函数:
protected function fetchfalseanswerquestion():void
{
sqlConnection = new SQLConnection();
sqlConnection.open(File.applicationStorageDirectory.resolvePath("SchoolSeries.db"));
var stmt:SQLStatement = new SQLStatement();
stmt.sqlConnection = sqlConnection;
stmt.text = "select * from Schoolseries_Exam_Mode_User_Answers where Result = 'False'";
stmt.execute();
var result11:SQLResult = stmt.getResult();
DataModel.getInstance().connection = sqlConnection;
listquestion.visible = true;
listquestion.dataProvider = new ArrayCollection(result11.data[0].data);
}
这是我的按钮控件和列表控件:
<s:Button id="showrecord" click="showrecord_clickHandler(event)">
</s:Button>
<s:List id="listquestion" visible="false" height="300" width="300" labelField="Fk_Question_Description">
</s:List>
但是,当我运行它时,我没有收到错误,但没有显示任何内容。
欢迎任何代码帮助/建议。