The following code is my custom table load function. info is a 2 dim
array with item type, offset, and sizes for each table item. What is
strange is that if I uncomment the error checking statements, I get
"Offset out of bounds" and "Invalid Sise" errors when r > 16, but when I
comment them out, everything runs fine. Any Ideas why?
Thanks,
Joshua Richie
UInt16 r;
char temp[40];
CALLBACK_PROLOGUE
r = TblGetRowID(table,row);
if (fld != NULL) {
// if (r >16) ErrDisplay("Setting field Usable");
FldSetUsable(fld,true);
// if (info[column][r].offset > sizeof(sips_record)) //ERROR
// ErrDisplay("Offset is invalid - is beyond end of record");
// if (r >16) {
// ErrDisplay("About to Set Text to field");
// StrPrintF(temp,"Column = %d, RowID = %d,Offset = %d,size =
%d",column,r,(UInt16)info[column][r].offset,(UInt16)info[column][r].size);
// ErrDisplay(temp);
// } //2038,15
FldSetText(fld,rec,(UInt16)info[column][r].offset,(UInt16)info[column][r].size);
// if (r >16) ErrDisplay("Just Set Text for Field");
}
CALLBACK_EPILOGUE
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/