yes.through the debugger,the field object is locked only twice.and the error
i'm getting is a run time error.ie,i'm getting the error only when i try to
write something into the field AND NOT OTHERWISE.anyway,her's what i'm
doing.
if(l_numofrecords<2)//this is to check locking,the variable increases
to 3
and no locking takes place later,it
skips the next line
MemHandleLock( g_recordH );
g_record = ( HelpDBType* )( g_recordH );
if (g_record == NULL)
return dmErrIndexOutOfRange;
l_fldP =( FieldType* )
mGetObjectPtr( l_frmP,FrmGetObjectIndex( l_frmP,
myfield1));
l_fieldH= FldGetTextHandle ( l_fldP );
l_fieldH=g_recordH;
FldSetText ( l_fldP,l_fieldH,0,sizeof((g_record->formid)));
FldDrawField ( l_fldP );
///i'm doing the same for the next field as well,ie, MYFIELD2 //
the following code goes in my form handle event when i exit from the form
through a button
l_frmP = FrmGetActiveForm();
FieldType* l_fldP,*l_fldPP;
l_fldP =( FieldType* )
FrmGetObjectPtr(l_frmP,FrmGetObjectIndex( l_frmP,
myfield1 ));
FldSetText ( l_fldP,NULL,0,sizeof(g_record->formid) );
//and of course the same for MYFIELD2.//
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
[EMAIL PROTECTED]
Sent: Friday, June 22, 2001 6:46 PM
To: Palm Developer Forum
Subject: Re: field overlocking?!!!
I need to see some code here. Have you tried running your program through a
profiler and see how many times the field's handle _actually_ is locked
without begin unlocked?
--
Christian
Falch.net DeveloperStudio for Palm OS
-"Developers' first choice for PDAs"
<http://www.falch.net/>
"Prashanth" <[EMAIL PROTECTED]> wrote in message
news:53934@palm-dev-forum...
>
> hey christian,
> no,you probably have mistaken me here.i have taken care of that.i'm
locking
> it only twice so there is no chance of the lock count increasing.but i'm
not
> unlocking it.i mean the overlocked handle error occurs only after 15 times
> of locking,which is not the case here,and morover the error message will
> be"CHUNK OVER LOCKED" and not "FIELD OVER LOCKED" for that case.do you
know
> what to do at this case?thanks for the answer though.
> prashanth
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> [EMAIL PROTECTED]
> Sent: Friday, June 22, 2001 6:04 PM
> To: Palm Developer Forum
> Subject: Re: field overlocking?!!!
>
>
> Prashanth,
>
> When working with fields, you can lock the handle to the field's text to
> manipulate it. When locking the handle, a reference count is increased to
> let different parts of your program lock the same handle at the same time.
> The catch is that you also need to unlock the handle, and that you can
only
> lock the handle a fixed amount of times without unlocking it. If you lock
it
> too many times without unlocking it the memory manager will tell you that
> you have overlocked the handle.
>
> --
> Christian
> Falch.net DeveloperStudio for Palm OS
> -"Developers' first choice for PDAs"
> <http://www.falch.net/>
>
>
> "Prashanth" <[EMAIL PROTECTED]> wrote in message
> news:53928@palm-dev-forum...
> >
> > hello!
> > if anyone is having one of the better days,please help me out here.
> > i'm basically working on records on text field.can anybody tell me
what's
> > "field overlocked" error?!!it's not "chunk overlock" because if i unlock
> the
> > memory handle it's giving me a "chunk underlocked" error!!!
> > thanks a lot in advance!
> > prashanth
> >
> >
> >
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/tech/support/forums/
>
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/