|
Post by metro on Jun 29, 2021 1:23:54 GMT -5
How can I avoid a runtime error is someone presses "ESC" when presented with with a NOTICE popup. EDIT sorted with on error
'Bring up a confirmation box to be sure that the user wants to quit on error goto [whoops] confirm "Are you sure you want to QUIT?"; answer$ if answer$ = "no" then [mainLoop] NOTICE "WHAT?" end [mainLoop] NOTICE "got Here" WAIT
[whoops] print "Error "; Err$; " "; " code "; Err
resume
|
|
|
Post by Rod on Jun 29, 2021 6:10:38 GMT -5
Hmm... Notice gives us a modal popoup message, the program wont move on till Enter,OK or Esc is pressed. Esc isnt mentioned in the help file but Esc should not lead to an error, it is just like pressing Enter or OK.
How do I get the runtime error in the posted code? This code is quite happy with Esc.
print "starting" NOTICE "first notice" NOTICE "second notice" print "ended nicely"
|
|
|
Post by metro on Jun 29, 2021 7:15:18 GMT -5
Thanks, Rod, your snippet works as expected . however for me if you remove the on error line in the code I posted I get .....
when "ESC" is pressed. mind you maybe it's a Wine & Linux Thing (not sure) or an issue with confirm
EDIT: poor description of problem, it is Confirm that causes the issue.
|
|
|
Post by Walt Decker on Jun 29, 2021 15:06:26 GMT -5
Suggestion: switch to the user32.dll function MessageBox()
For an example there is one in part VI of things you don't want to know... in forum General Discussion.
|
|
|
Post by metro on Jun 29, 2021 18:08:40 GMT -5
Suggestion: switch to the user32.dll function MessageBox()
For an example there is one in part VI of things you don't want to know... in forum General Discussion. Thanks Walt, I'll attempt that later today. Ive downloaded everything I don't want to know as you've posted them. Very much appreciate your efforts metro
|
|