Hello,

I have spent a whole day on this problem with no result. I am trying to read a
database and display a record in a field.
It should be simple but I keep getting Error   : illegal implicit conversion
from 'unsigned short' to 'char *' at StrCopy(textP, record);

Would be really grateful if anyone can provide a tip.

Regards,

Barry


static void ReadRecord (FormPtr frmP)
{
    Boolean handled = false;
    FormType    *form;
    FieldType   *field;
    MemHandle   recordH;
    MemHandle   oldTextH;
    MyRecordType    *record;
    UInt16 index = 0;
    WChar   textP;
    
    form = FrmGetActiveForm();
    field = FrmGetObjectPtr(form,
            FrmGetObjectIndex(form,MainShoveinHereField));
    
    oldTextH = FldGetTextHandle(field);
    
    //Dispose of the old handle to prevent a memory leak.
    if (oldTextH)
        MemHandleFree(oldTextH);
        
    recordH = DmGetRecord(gDatabase, index);
    record = MemHandleLock(recordH);
    StrCopy(textP, record);
    FldInsert(field, textP, StrLen(textP);
        MemHandleUnlock(recordH);
        handled = true;
}
At StrCopy I get "Error   : illegal implicit
conversion from 'unsigned short' to 'char *'


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

Reply via email to