I am trying to set a button caption from a string in a database record, but am not having success. There is a null-terminated string in the field, and stepping through the code it appears to work fine, but the button displays blank, and appears to be corrupt. What am I doing wrong? Does the recP variable lose scope when exiting the routine? If so, where should I put the string? In a global?
// Get packed record from the database. recH = DmQueryRecord(gDB, *index); packedRecP = (PackedRec *) MemHandleLock(recH); if (packedRecP == NULL) return (false); // Unpack the record. UnpackRec(recP, packedRecP); // Change button label, show it ctlP = GetObjectPtr(buttonIndex); CtlSetLabel(ctlP,recP->textField); CtlShowControl(ctlP); Thanks, Geoff Thompson [EMAIL PROTECTED] -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/