"Edwin Hoh" <[EMAIL PROTECTED]> wrote in message
news:56951@palm-dev-forum...
>
> yeah Steve... that was what I meant, coz I am using FrmAlert with the
3 said
> buttons (Yes, No and Cancel). My question here really is how can I
capture
> which button was pressed... I tried something like this but obviously
I'm
> not getting it right :
>
> if (FrmAlert(SaveChangeAlert)==SaveChangeYes) {
> Save_OnClick();
> FrmAlert(SaveAlert);
> FrmPopupForm(MainForm);
> }
> else if (SaveChangeNo) {
> .................
> }
> else if(SaveChangeCancel) {
> ................
> }
Use a switch/case block rather than if/then/else. Your second if is
equivalent to
else if (1)
which is always true... instead write
switch (FrmAlert(SaveChangeAlert))
{
case SaveChangeYes:
break;
case SaveChangeNo:
break;
case SaveChangeCancel:
break;
}
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/