While updating a textTableItem cell in a table (with 2 columns, a label, and a 
text), I am facing an "Invalid field length" error only when I use a Treo 
Simulator. 
Table has only a LoadData callback, without SaveData.
This does not occur with the same code on any other device, simulator or 
emulator.
Anyone knows where is the problem ?

Here is the code, called inside ctlSelectEvent:

Int16 row, col;
Char str[10];
Char *pChar;

TblGetSelection (ftableP, &row, &col);
pChar = MemHandleLock (fCellData[row]);

// Do some text manipulation
StrCopy (str, pChar);
StrCat (str, "1234");

// Enlarge 
MemHandleUnlock (fCellData[row]);
MemHandleResize (fCellData[row], StrLen (str)+1);
pChar = MemHandleLock (fCellData[row]);

// Copy back to the handle
StrCopy (pChar, str);
MemHandleUnlock (fCellData[row]);

// Redraw
TblMarkRowInvalid (ftableP, row);
TblRedrawTable (ftableP);
return (false);



// The LoadData callback is a very "standard" one
*dataH = fCellData[row];
*dataOffset = 0;
*dataSize = MemHandleSize (*dataH);
return (0);


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

Reply via email to