I am using CW for Palm R6, SDK 3.1. Testing POSE 3.0a6, Palm V 3.1 ROM and on
a real device (m505, Palm OS 4.0).
I have a table with cells set to customTableItem type. I am trying to display
something like "15:34 f". I TblSetItemInt( 1534 ) and then TimeToAscii() this
to "15:34" in the callback function.
I put "f" in the cell's 'ptr' area via TblSetItemPtr(). I retrieve this via
the old syntax:
tableP->items[row * tableP->numColumns + column].ptr
(when I upgrade to SDK 5 I'll use TblGetItemPtr).
The problem: On the first cell I send 'f' and receive 'f'. On the second cell
I send 'b' and receive 'b'. On the other cells I receive 'f' no matter what I
send.
Example code calling TblSetItemPtr():
/* Put the data after the time, if any, into the table ptr item. */
CharPtr pRec;
Char szEndPoint[ 30 ];
Int16 nDay = 0;
StrCpy( szEndPoint, "1534f" );
Char ch = szEndPoint[ nDay ];
/* Go through string looking for the first non-numeric char. */
while ( ch && ch >= '0' && ch <= '9' )
{
nDay++;
ch = szEndPoint[ nDay ];
}
if ( ch )
{
pRec = szEndPoint + nDay;
}
else
pRec = NULL;
TblSetItemPtr( pBusTimes, i, nColumn, pRec );
Is this code bad? Is it causing the problem?
Should I just put the "1534f" string in 'ptr' and parse in the callback?
Damien.
________________________________________________________________________
Want to chat instantly with your online friends? Get the FREE Yahoo!
Messenger http://uk.messenger.yahoo.com/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/