Believe me or not, the error goes away after I declared the variable in a
separate line, e.g.
Char * fieldP;
Char * recordP;

Elizabeth Chang
ISSI Consulting Group


-----Original Message-----
From: Yu, Ken [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 16, 2000 11:35 AM
To: Palm Developer Forum
Subject: RE: SDK 3.5 Type Conversion Error


Elizabeth,

fieldP is declared as a char. The way you have it now is that fieldP is an
actual char
not a pointer (which is what MemHandleLock() returns).

Try:
Char * recordP, *fieldP;

-Ken

> ----------
> From:         Elizabeth Chang[SMTP:[EMAIL PROTECTED]]
> Reply To:     Palm Developer Forum
> Sent:         Wednesday, February 16, 2000 2:29 PM
> To:   Palm Developer Forum
> Subject:      SDK 3.5 Type Conversion Error
> 
> Error   : cannot convert
> 'void *' to
> 'char'
> FRPchecklist.c line 704      fieldP = MemHandleLock(fieldH);
> 
> 
> This is what is in my C code:
> 
> static Err EditFormGetRecordField (MemPtr table, UInt16 row, UInt16
> column, 
>       Boolean editing, MemHandle * textH, UInt16 * textOffset, UInt16 *
> textAllocSize, 
>       FieldPtr fld)
> {
>       UInt16 fieldNum;
>       UInt16  fieldIndex;
>       Char * recordP, fieldP;
>       MemHandle recordH, fieldH;
>       UInt16 fieldSize;
>       FrpDBRecordType record;
> 
>       
>       // Get the field number that corresponds to the table item.
>       // The field number is stored as the row id.
>       //
>       fieldIndex = TblGetRowID (table, row);
>       fieldNum = FieldMap[fieldIndex];
> 
>       FrpGetRecord (AppDB, CurrentRecord, &record, &recordH);
> 
>       if (editing)
>       {
>                       EditFormSetGraffitiMode(fld, fieldNum);
>               if (record.fields[fieldNum])
>               {
>                       fieldSize = StrLen(record.fields[fieldNum]) + 1;
>                       fieldH = MemHandleNew(fieldSize);
>                       fieldP = MemHandleLock(fieldH);
> 
> 
> I had no problem when using SDK 3.1 which came with CW R6.  I looked into
> SDK 3.5 sample application Address.mcp to see what I was missing and could
> not find any clue.  Thanks.
> 
> 
> Elizabeth Chang
> ISSI Consulting Group
> 
> 
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palm.com/devzone/mailinglists.html
> 

-- 
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palm.com/devzone/mailinglists.html

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to