Text Widhget Crashed in Device | developer.brewmp.com Text Widhget Crashed in Device | developer.brewmp.com


Text Widhget Crashed in Device

Hi All,

I have a problem with textWidget while running on device. In Simulator it works fine.

I just created a text widget and setted this widget to a form and inserted in to XY Container and pushed in to the rootForm. It works fine on simulator. Unfortunately Phone crashed while this running on device.

My Code is bellow, could any one plz help me.

void createCustomTextScreen(MainMenu* pApp)
IForm* textForm;
IWidget* textWidget;
IWidget* containerWidget;
int result;
IXYContainer* textBoxContainer;
WExtent we;
WidgetPos dwpos;
we.width = 200;
we.height = 25;

result = ISHELL_CreateInstance(pApp->piShell, AEECLSID_FORM, (void**)&textForm);
result = ISHELL_CreateInstance(pApp->piShell, AEECLSID_TEXTWIDGET, (void**)&textWidget);
result = ISHELL_CreateInstance(pApp->piShell, AEECLSID_XYCONTAINER,(void**)&textBoxContainer);

IFORM_SetText(textForm, FID_TITLE, Title);
IFORM_SetSoftkey(textForm,FID_SOFTKEY1, preview);
IFORM_SetSoftkey(textForm,FID_SOFTKEY2, Back);
IWIDGET_SetText(textWidget, L"HHH", TRUE);

IFORM_GetTitleWidget((IForm*)pApp->rootForm, &title);
IWIDGET_SetBGColor(title, MAKE_RGB(0,0,0));
IFORM_GetSoftkeyWidget((IForm*)pApp->rootForm, &command);
IWIDGET_SetBGColor(command, MAKE_RGB(0,0,0));
IWIDGET_SetFGColor(command, MAKE_RGB(255,255,255));

IWIDGET_SetExtent(textWidget, &we );
IWIDGET_SetFlags(textWidget, TWF_MULTILINE );
IWIDGET_SetBGColor(textWidget, MAKE_RGB(100,255,100)); //text box fill
IWIDGET_SetBorderColor(textWidget, MAKE_RGB(0, 0, 0));
dwpos.x =15 ; dwpos.y = 80 ; dwpos.bVisible = TRUE;
IXYCONTAINER_Insert(textBoxContainer, textWidget, WIDGET_ZNORMAL, &dwpos ); if(IXYCONTAINER_QueryInterface(textBoxContainer, AEEIID_WIDGET, (void**)&containerWidget)== SUCCESS)
IWIDGET_SetBorderColor(containerWidget, MAKE_RGB(0,0,0));
IWIDGET_SetBorderWidth(containerWidget, 2);
IFORM_SetWidget(textForm,WID_FORM, containerWidget);
HANDLERDESC_Init(&pApp->textFormHandler, TextForm_HandleEvent, pApp, NULL);
IFORM_SetHandler(textForm, &pApp->textFormHandler);
IROOTFORM_PushForm(pApp->rootForm, textForm);


help me... if there is any OEM problem . My device is siemens SXG75

help me... if there is any OEM problem . My device is siemens SXG75