I need some help on what appears to be a simple task, closing the application. I can't control the location of where someone might be in an extensive application when they decide to exit so I connected all exit scripts to point to file 10 to close. I was thinking that controling how the application closes would be the right thing to do.
I have a close script like this in file #10:
Close ["file 1"]
Close ["file 2"]
Close ["file 3"]
Close ["file 4"]
Close ["file 5"]
Close ["file 6"]
Close ["file 7"]
Close ["file 8"]
Close ["file 9"]
Close ["file 10"]
Each files 1-9 contain a script like this:
Perform Script [Subscript,"File 10"] which calls the above script.
Then in the application preferences I set an additional exit script to perform on exit of File 10.
This exit script contains "Exit Application". So I thought File 10 would close itself as a final script step and because it closes it would call an exit application script.
In my mind, I thought I covered all my bases. When I produce this in Runtime, it appears to close the application fine, but upon re-entering the application, I get several banners that the file was not closed properly and some may even require integrity checks. I can again exit the application without doing anything, and upon re-entry, the same file not closed properly and intergrity checks are performed again.
What could I be missing?
The only other thing I should mention, is not all files may be opened when I call the script to close them. Could this cause an error on an un-opened file?
Thanks
Marty
I have a close script like this in file #10:
Close ["file 1"]
Close ["file 2"]
Close ["file 3"]
Close ["file 4"]
Close ["file 5"]
Close ["file 6"]
Close ["file 7"]
Close ["file 8"]
Close ["file 9"]
Close ["file 10"]
Each files 1-9 contain a script like this:
Perform Script [Subscript,"File 10"] which calls the above script.
Then in the application preferences I set an additional exit script to perform on exit of File 10.
This exit script contains "Exit Application". So I thought File 10 would close itself as a final script step and because it closes it would call an exit application script.
In my mind, I thought I covered all my bases. When I produce this in Runtime, it appears to close the application fine, but upon re-entering the application, I get several banners that the file was not closed properly and some may even require integrity checks. I can again exit the application without doing anything, and upon re-entry, the same file not closed properly and intergrity checks are performed again.
What could I be missing?
The only other thing I should mention, is not all files may be opened when I call the script to close them. Could this cause an error on an un-opened file?
Thanks
Marty