Hi,
I'm trying to edit a string in a field. The string is part of a struct
read as a database record:
typedef struct
 {
 UInt32 otherUint32;
 Char theString[30];
 UInt16 otherUint16;
 DateType otherDate;
 } myrec;

myrec *recP;
myrec *nilP=0;

The string is initialized:
recP->theString[0]=0;

Note that the field max characters is set to 30 in constructor. Then,
the record chunk is locked and its handle passed to the field:
FldSetText(fldP,recordHandle,(UInt32)
&nilP->theString,sizeof(myrec->theString));

All this works well except that when the field is edited, the characters
are inserted in the memory, and hence moving all elements that follow
the string in the record by a number of bytes equal to the number of
characters input. Is there any way to have the field replace rather than
insert the characters, or am I doing something wrong?

Thanks,
Massimo


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

Reply via email to