After getting unexpected behavior while working on a more complicated dialog window, I created a simple database with a simple dialog form with 3 objects: a text edit box, Cancel button, and OK button. The buttons have resume {}
as their only code. When I present the form using Rundialog
the code below should display my ‘in loop’ message when I hit the OK button but keep the dialog window open. Instead, the window closes and I only get my ‘after loop’ message. Rundialog seems not to be responding to the if info("trigger") contains "Button.OK"
part of the code. What the heck am I missing??
[mac os monterey 12.2.1 Pan X 10.2.0.b25 (3901)]
fileglobal fgV01
fgV01=A
loop
rundialog |||
Form="DialogForm"
sheet=true
Menus=normal
Height=780 Width=1060
|||
stoploopif info("trigger")="Dialog.Close"
if info("trigger") contains "Button.OK"
message "in loop ok message"
settrigger ""
endif
endloop
if dlgResult="Cancel"
message "afterloop cancel message"
endif
if dlgResult="Ok"
message "afterloop ok message"
endif