I have an uneditable table that I'm populating with the TblSetLoadDataProcedure callback. The beginning of the callback looks something like this:


static Err
cfLoadTextTableItem(void *table, Int16 row, Int16 col, Boolean editable,
MemHandle *dataH, Int16 *dataOffset, Int16 *dataSize, FieldPtr field)
{
UInt16 index = row+cgFirstVisibleRow;
*dataH = cfGetNameMemHandle(index);
*dataOffset = 0;
*dataSize = MemHandleSize(*dataH);
:
I modify the contents of the table by resizing the memory handle returned by cfGetNameMemHandle() and changing the string pointed to by the handle (I'm not changing the handle itself). Then call TblDrawTable to refresh the contents. This has worked fine on POSE and related devices, but on the Simulator I'm finding that when I modify handles as before, the callback isn't getting called by TblDrawTable. Rather, Simulator reports the error "PalmOSField.c, Line:756, Invalid field length" though the table is getting updated with the new contents of the handles, it's just the dataSize value is the old value. So, if changing the text "Johnson" to "John" shows "John[][][]" in the list. Likewise, changing "MOMA" to "Smithsonian" displays "Smit."


Thanks,
Rich



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

Reply via email to