HI every one,
I am trying to make a customizable Alert which can take some text from a text
field and display it in a Alert. i am trying the function given below... why
does'nt the "FrmCustomAlert" function work. The message in the Alert never
cahnges... it remains the default message all the time. What am i doing wrong
??? Is there some way to make a special Alert which is customizable ?
static void SaySomething (UInt16 alertID)
{
FormType *form = FrmGetActiveForm();
FieldType *field;
MemHandle h;
field = FrmGetObjectPtr(form, FrmGetObjectIndex(form, MainNameField));
if (FldGetTextLength(field) > 0) {
FldCompactText(field);
h = FldGetTextHandle(field);
if (h) {
Char *s;
s = MemHandleLock((void *)h);
FrmCustomAlert(alertID, s, NULL, NULL);
MemHandleUnlock((void *)h);
}
} else {
// No text in field, so display a “whoever you are”
// dialog.
FrmCustomAlert(alertID, "who", NULL ,NULL);
}
}
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/