Things to try:
A) make sure 's' is pointing to a valid string. Set a breakpoint and look
as 's' (garbage in, garbage displayed)
B) make sure you have at least ^1 in your custom alert
C) use " " (note the space between the quotes) for the 2nd and 3rd
parameters in FrmCustomAlert instead of NULL or empty string. (more for
compatibility and out of habit)
----- Original Message -----
From: "Preston James" <[EMAIL PROTECTED]>
Newsgroups: palm-dev-forum
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Thursday, October 10, 2002 11:48 AM
Subject: Need Some N00b Help
> I have a field that displays a number I'm trying to get it to display out
of
> this Alert(used a example from The Palm OS Programming Bible).
> The Alert displays however the content does not change.
> any ideas?
> static void AnswerAlert(UInt16 alertID)
> {
> FormType *form = FrmGetActiveForm();
> FieldType *field;
> MemHandle h;
>
> field = FrmGetObjectPtr(form, FrmGetObjectIndex(form, txtTotalFeet));
> if (FldGetTextLength(field) > 0){
> FldCompactText(field);
> h = FldGetTextHandle(field);
> if (h){
> Char *s;
> s = MemHandleLock((void *)h);
> FrmCustomAlert(alertID, s, "", "");
> MemHandleUnlock((void *)h);
> }
> }
> }
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/