|
|||
|
I was under the impression that the wnd.close() method would kill the application on the spot but it doesn't.
I have a script that has few database call. If an db error occurs, an error method is called to display a dialog box with the appropriate db error message and then close the application with wnd.close() when the dialog box is dismissed. Funny thing is the calling script then continue to execute after the wnd.close() is issued. I know that for a fact because I have a log mechanism that output db and other transaction into a text file and the wnd.onClose method is using it to output information when the application close. While onClose output the proper info, I can also see in the log file that other outputs occured after onClose was executed. To ensure that the rest of the script won't execute I added a return statement after the error method call. This solved my problem. I had a good look at the help file and couldn't find a method that would actually "kill" the application so any scripts or method in process would stop excuting right away. Is swfkit provides a "kill" method? |
|
|||
|
The close() method just post a WM_CLOSE message to the main window which won't be received by the main window until the current script is finished. So you must add a return clause after the close method to make the script stop immediately.
We will add a Kill method in the new version to kill any processed. |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|