IROOTFORM_PushForm 不能显示form,怎么办啊,急求解答!
result = ISHELL_CreateInstance(pMe->pIShell, AEECLSID_FORM,
(void * *) &pFlashSMSReadForm->pForm);
if (result == 0)
{
MSG_FATAL("================ set soft keys",0,0,0);
result = IFORM_SetSoftkeys(pFlashSMSReadForm->pForm, kksms_GetLanguageResFilename(),
0, 0, IDS_INBOX_RETURN);
MSG_FATAL("================ set res text",0,0,0);
result += IFORM_SetResText(pFlashSMSReadForm->pForm, FID_TITLE,
kksms_GetLanguageResFilename(), IDS_KKSMS_READ);
MSG_FATAL("================ init handleevent",0,0,0);
HANDLERDESC_Init(&pFlashSMSReadForm->handler, KKSMS_FlashSMSForm_HandleEvent,pMe, KKSMS_FlashSMSForm_Delete);
IFORM_SetHandler(pFlashSMSReadForm->pForm, &pFlashSMSReadForm->handler);
}
if (result == 0)
{
result = KKSMS_FlashSMSForm_PopulateMainContainer(pMe); // 这里为form添加container,两个textwidget
}
if (result == 0)
{
MSG_FATAL("================ push form",0,0,0);
result = IROOTFORM_PushForm(pMe->view.pRootForm, pFlashSMSReadForm->pForm);
MSG_FATAL("================ push form result : %d",result,0,0);
}
每个log也都打印出来了,可就是出现不了form。都折腾两三天了,到底是怎么回事啊,恳请各位高手解答,谢谢!
[解决办法]
这和你注册的handler有关系,你的handler里面最后一定要return HANDLERDES_Call(),用这个函数作为返回,因为这样pushform这样的事件才能执行到。