Hi everybody,
i got a error "has just read from memory location 0X00000002 which is in
low memory" i select continue and it work well, it happen just when i write
in the middle of text field string , when i write after the last caracter
doesn�t happend anybody could help me ???
The source code is below.
thanks a lot
Andres Mora
General manager
Handy Level
Mobile Solutions
The procedure to put text in the Text Field
static void SetFieldData(FieldPtr fld, char* NewData)
{
VoidHand textHandle,oldTxtH;
CharPtr textPtr;
/* get the old text handle */
textHandle = MemHandleNew(StrLen(NewData) + 1 );
textPtr = (char *)MemHandleLock(textHandle);
/* change the text and update the display */
StrCopy(textPtr, NewData);
MemHandleUnlock(textHandle);
oldTxtH = FldGetTextHandle(fld);
FldSetTextHandle(fld, textHandle);
/* free the old text handle */
if (oldTxtH)
MemHandleFree(oldTxtH);
FldDrawField(fld);
}
The Text that i assign
typedef struct
{
......
.....
.....
SWord TipoPeso;
char Valores[18][8];
char Peso[6];
}ArchivoTipo ;
char texto[13];
ArchivoTipo *RecordPtr;
VoidHand recHandle;
frm = FrmGetActiveForm();
FpValorAseg = FrmGetObjectPtr(frm,
FrmGetObjectIndex(frm,EditVAseguradoFieldField))
/* In the constructor the field EditVAseguradoFieldField has 13 in Max
Character property*/
recHandle = DmQueryRecord(FaTipoDB, CodAct);
if (recHandle)
{
RecordPtr = MemHandleLock(recHandle);
StrCopy(texto,RecordPtr->Valores[17-ModeloInd]);
StrCat(texto,"000");
SetFieldData(FpValorAseg, texto);
StrCopy(ValorAsegFas,texto);
.
.
.
.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/