我正在创建一个 S60 应用程序,它将有一个主对话框和一个包含 5 个左右项目的列表框。
但是当我尝试在模拟器上运行应用程序时,我不断收到一条消息:“应用程序 app1 已关闭”。
这是我的资源文件(app1.rss)内容:
RESOURCE DIALOG r_dialog
{
flags=EAknDialogSelectionList;
buttons=R_AVKON_SOFTKEYS_OPTIONS_EXIT;
items=
{
DLG_LINE
{
id=EPowerSMSDlg1Label;
type=EAknCtSingleGraphicListBox;
control= LISTBOX
{
flags = EAknListBoxSelectionList;
array_id=array0;
};
},
DLG_LINE
{
itemflags = EEikDlgItemNonFocusing;
id = EFindControl;
type = EAknCtSelectionListFixedFind;
}
};
}
RESOURCE ARRAY array0
{
items=
{
LBUF { txt="Events Log"; }
};
}
我做错了什么?
最佳答案
您正在经历 panic 。你应该enable extended panic code查看您遇到的是哪种 panic ,然后引用 system panic reference documentation看看它是什么意思。
在这种特殊情况下,至少您的列表框项目格式不正确。 EAknCtSingleGraphicListBox
枚举值对应于 CAknSingleGraphicStyleListBox
类和 its documentation指出
list item string format: "0\tTextLabel\t1\t2" where 0,1,2 are index to the icon array
您的项目文本缺少制表符分隔符。
关于c++ - 带有 LISTBOX 的对话框应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1917590/