Hi All,
At one of my forms, when the user presses a button, I pop up a small modal
form. The form contains an input field and OK and CANCEL buttons. Since I
have to validate the user's input, I have the following loop:
FormPtr dialog = FrmInitForm(my_dialog);
Word button_selected;
Boolean success = false;
Boolean done = false;
while (!done) {
button_selected = FrmDoDialog(dialog);
switch (button_selected) {
case ok_button:
if (user input was valid) {
done = true;
success = true;
}
else
FrmCustomAlert(show error message);
break;
case cancel_button:
done = true;
break;
}
}
FrmDeleteForm(dialog);
if (success) // do further processing
This works just fine. The problem is that if the user presses the
application silk-screen button while the dialog is up, I am in an infinite
loop. How can I test in my WHILE loop for this condition so that I can exit?
Thanks in advance,
Tom Ward
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html