Hi
I have a table with 7 rows and 2 columns. In all rows of the first column i copy data
that is stored in a string.
I have to use a handle pointer that i resize during runtime. But I'm unable to free it
with MemHandleFree.
static Err DrawDetail (void * table, Int16 row, UInt16 column,
Boolean editable, MemHandle *dataH, UInt16 * dataOffset, UInt16 * dataSize,
FieldPtr fld)
{
FieldAttrType attr;
CharPtr p;
VoidHand CustomerHandles = 0;
Char myString[20];
ULong numBytes = TblGetNumberOfRows(table) * sizeof(Handle);
FldGetAttributes(fld, &attr);
attr.editable = 0;
attr.underlined = 0;
attr.justification = leftAlign;
FldSetAttributes(fld, &attr);
SysStringByIndex( catName, row /* index */, myString, sizeof(myString) );
CustomerHandles = MemHandleNew(numBytes);
handles[row] = MemHandleLock(CustomerHandles);
handles[row] = MemHandleNew(StrLen(myString)+1);
p = MemHandleLock(handles[row]);
StrCopy(p, myString);
MemHandleUnlock(handles[row]);
*dataH = handles[row];
*dataSize = MemHandleSize(*dataH);
*dataOffset = 0;
MemHandleUnlock(CustomerHandles);
MemHandleFree (CustomerHandles);
return 0;
}
I'm very thankfull for every help you can give me and if i need to i would use a total
differet solution.
______________________________________________________________________________
Horoskop, Comics, VIPs, Wetter, Sport und Lotto im WEB.DE Screensaver1.2
Kostenlos downloaden: http://screensaver.web.de/?mc=021110
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/