PatriciaW Posted October 9, 2005 Posted October 9, 2005 I have an application where I want to do some processing when closing the file, but it appears that when I Quit FileMaker, by the time that the script gets invoked that only one window remains open. All other windows have been closed. Is there any way to prevent this?
Vaughan Posted October 10, 2005 Posted October 10, 2005 A file's shutdown scripts is run when the *last* window of the file is closed. What processing are you trying to do?
PatriciaW Posted October 10, 2005 Author Posted October 10, 2005 (edited) The application was designed with a Shutdown button. I developed a script for that which checked for outstanding (uncommitted) windows by means of some global "status" fields and prompted the user to return to any windows with uncommitted updates. This script worked fine, but if the use quit the application the same script didn't work, so I needed to understand what was happening. I presume (hope) that it doesn't close windows with uncommitted changes. In which case, I just need to check for open windows. Edited additional notes: I hadn't tested this above presumption when I wrote this, but it appears that it closes the windows without commiting the changes. How can I inform the user that there was an open window with unsaved changes? and allow them to return to that window to save them? This is what the script which is invoked by the Shutdown button does. Edited October 10, 2005 by Guest
PatriciaW Posted October 10, 2005 Author Posted October 10, 2005 I have developed a workaround ... perhaps not elegant but it appears to work. I added a mandatory field to each database, which if empty generates an error messages asking the user to save the outstanding changes. Then in the various scripts that start an update, I set this field to Null. When the Save Changes process completes, the field is set to non-null. I'd still be interested in a better solution (if such exists.)
Recommended Posts
This topic is 6986 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now