The emulator is returning an error indicating an unlocked chunk error. As it 
explains this is caused by trying to use a pointer returned by a handle 
after it has been unlocked. I suspect there may be something wrong in this 
function.  Can anyone give me some advice on this function or if there is a 
problem at all.



char *getFieldText(UInt16 fieldID)
{
 FieldType *fldP;
 Char *fieldText;
 MemHandle h;
 fldP=getObjectPtr (fieldID);
 h=FldGetTextHandle(fldP);
 if (h !=NULL)
 {
  fieldText= MemHandleLock(h);
  FldSetTextHandle(fldP,h);
  MemHandleUnlock(h);
 }
 else
  fieldText=NULL;
 FldSetTextHandle(fldP,NULL);
 return fieldText;
}

Thanks,
Jim Haines 

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to