I'm having problems with the onstop function. The reenter instruction does not work when I click Cancel. When you click this button, the application does not remain open but stops. What is the problem? I'm using CSPro 7.7.3.
If I press CTRL + S then everything works fine. Doesn't work when I click Close (X) in the window. Is there any way to fix this? I assume that the logic works, but because when X is pressed it means kill process and the logic is not executed
Code: Select all
function OnStop()
numeric response = errmsg(tr(00112))
select(
tr(00003), continue,
tr(00004), continue,
tr(10052), continue
);
if response = 3 then
// Cancel
reenter;
elseif response = 1 then
// Save and quit
if savepartial() then
openMenu(tr(10065));
else
errmsg(tr(10066));
endif;
endif;
stop(1); // close the program
end;