Could you please comment the following function:
void UpdateControl(FormPtr f, UInt16 id, Char * s) {
ControlType *ctl;
Char *label;
ctl = FrmGetObjectPtr(f, FrmGetObjectIndex(f, id));
label = (Char *) CtlGetLabel(ctl);
StrCopy(label, s);
CtlSetLabel(ctl, label);
}
It does update the label of a control (selector, popup, button) by copying
the new string to the old location (similar to FrmCopyLabel with labels).
Of course the new string must not be longer than the old one. But are
there any other problems? Perhaps with the direction PalmOS 5 will go? The
function assumes that the memory location of the old label is writeable.
Will this assumption still be correct for PalmOS 5?
--
Remo Hofer <[EMAIL PROTECTED]>
http://www.geocities.com/SiliconValley/Cable/5206/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/