Hi Aaron,
I am sorry for using this word "Urgent"
You are very correct in guessing the code which i have
wriiten since only those forms are giving me problems
where i am handling frmCloseEvent.
Actually what i am doing is in frmCloseEvent i have
used many MemPtrFree() and also saving few things in
the pdb and things like that. And after doing all this
just break.
But based on my implementation requirement i have to
do all these things in frmCloseEvent. So could you
please suggest me what shall i do. I am sending on of
sample frmCloseEvent which i have implemented.
case frmCloseEvent:
if(bAdhoc == true || bCloseButton == true ||
giRecordSelected == -1)
{
break;
}
else
{
//pass all the informaion in the Global job info Ptr
//if it has not been passed before.
tblP = (TablePtr)GetObjectPtr
(JobAssignmentLocationTable);
bSelected =
TblGetSelection(tblP,&iRowSelected,&iColumnSelected);
giRecordSelected = (giStartIndex + iRowSelected) ;
if(bSelected == 0)
{
giRecordSelected = -1;
}
gstJobInfoP = (JOBINFO*)MemPtrNew(sizeof(JOBINFO));
if(bJobDetail != true)
{
dbID = DmFindDatabase(0,JOBINFODB);
if(dbID == NULL)
{
FrmCustomAlert(ErrorAlert,NODATABASE," " ," " );
closeApplication();
return false;
}
dbRef = DmOpenDatabase(0,dbID,dmModeReadOnly);
if(dbRef == NULL)
{
FrmCustomAlert(ErrorAlert,NODATABASE," " ," " );
closeApplication();
return false;
}
mhRecHandle = DmQueryRecord(dbRef,giRecordSelected);
//get pointer to locked record.
stJobInfoP = (JOBINFO*)MemHandleLock(mhRecHandle);
//If memory is there put the values in write
structure.
StrCopy( gstJobInfoP->cJobId, stJobInfoP->cJobId );
StrCopy( gstJobInfoP->cJobType, stJobInfoP->cJobType
);
StrCopy( gstJobInfoP->cFunctionLocationId,
stJobInfoP->cFunctionLocationId );
StrCopy( gstJobInfoP->cFunctionLocationDescription,
stJobInfoP->cFunctionLocationDescription );
StrCopy( gstJobInfoP->cPlannedStartTime,
stJobInfoP->cPlannedStartTime );
StrCopy( gstJobInfoP->cPlannedEndTime,
stJobInfoP->cPlannedEndTime );
//Modifying value
StrCopy( gstJobInfoP->cActualStartTime,
stJobInfoP->cActualStartTime );
StrCopy( gstJobInfoP->cActualEndTime,
stJobInfoP->cActualEndTime);
MemHandleUnlock(mhRecHandle);
DmCloseDatabase(dbRef);
}
bJobDetail = false;
break;
So like this i have used in few other forms as well.
So here i need your suggestion to handle this problem.
Thanks in advance
--- Aaron Ardiri <[EMAIL PROTECTED]> wrote:
> > I need few urgent help.
>
> urgent = not a good word to use here.
>
> > I have quite a big application. Now one problem
> which
> > i am facing with few forms is when i call
> > FrmGoToForm()
> > to switch to another forms previous forms controls
> > does not disappear. This too does not happen when
> i am
> > doing first time. Infact after performing certain
> > operations i save data. Then again when i
> navigate
> > these forms this problem occurrs.
> > Can there be any suggestions for this problem.
> > My device is SPT 1800 and OS is 4.0. Is there
> > something which is related to OS , or something
> which
> > is related to my code.
>
> has nothing to do with the unit you are using. you
> say you
> are saving data? this tells me you are most likely
> handling
> the frmCloseEvent event, and, not allowing the
> system to
> clean up the form.
>
> for example, you are returning true, when you should
>
> actually be returning false. that is just my
> educated
> guess tho :)
>
> ---
> Aaron Ardiri
> [EMAIL PROTECTED]
> CEO - CTO
> +46 70 656 1143
> Mobile Wizardry
> http://www.mobilewizardry.com/
>
> --
> For information on using the Palm Developer Forums,
> or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/
________________________________________________________________________
Missed your favourite TV serial last night? Try the new, Yahoo! TV.
visit http://in.tv.yahoo.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/