Hello EB,
My Application Create Dynamic Field on static Forms .
If Field on Form is not Selected and Jump to Next Form Application Run Well .
But if we Select Field and Jump to Next Form it will Crashes after FrmDispatchEvent(&event) in AppEventLoop.
My Application Create Dynamic Field on static Forms .
If Field on Form is not Selected and Jump to Next Form Application Run Well .
But if we Select Field and Jump to Next Form it will Crashes after FrmDispatchEvent(&event) in AppEventLoop.
Does anybody know why this Error Has Occur and Solution for this.
Code to Create Field
void Create_Field(Coord Co_x,Coord Co_y,Coord Co_width,Coord Co_height,Boolean Numeric,UInt32 T_Char,Boolean B_singleLine)
{
Boolean B_numeric=Numeric; // Numeric
pForm=FrmGetActiveForm();
Fld_ptr=FldNewField((void **)ppForm,(Q_Id),Co_x,Co_y,Co_width,Co_height,stdFont,T_Char,true,grayUnderline,B_singleLine,true,leftAlign,true,true,B_numeric);
mHandle=MemHandleNew((10+T_Char));
if(mHandle==0)
FrmCustomAlert(10000,"MemHandleNew Failed",NULL, NULL);
else
FldSetTextHandle(Fld_ptr,mHandle);
if(mHandle)
{
FldSetTextHandle(Fld_ptr,NULL);
S1=MemHandleLock(mHandle);
if((StrLen(gC_pAns)>0))
{
if(gC_pAns[0]=='@')
StrCopy(S1,"");
else
StrCopy(S1,gC_pAns);
FrmCustomAlert(10000,"MemHandleNew Failed",NULL, NULL);
else
FldSetTextHandle(Fld_ptr,mHandle);
if(mHandle)
{
FldSetTextHandle(Fld_ptr,NULL);
S1=MemHandleLock(mHandle);
if((StrLen(gC_pAns)>0))
{
if(gC_pAns[0]=='@')
StrCopy(S1,"");
else
StrCopy(S1,gC_pAns);
} // End Of if((StrLen(gC_pAns)>0)
Statement
else
StrCopy(S1,"");
MemHandleUnlock(mHandle);
FldSetTextHandle(Fld_ptr,mHandle);
}
FldDrawField(Fld_ptr);
}
else
StrCopy(S1,"");
MemHandleUnlock(mHandle);
FldSetTextHandle(Fld_ptr,mHandle);
}
FldDrawField(Fld_ptr);
}
Regards
Shailesh
Yahoo! Photos
Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever. -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/