alexliz Posted September 7, 2002 Posted September 7, 2002 I have developed a system comprising 6 files in FMP5.5v2. The user starts off by a shortcut to the main file, which opens up all the others, initializes variables etc. When shutting down, I include a ShutDown Script with the main file, which closes the other 5 files (by calling 5 times the external ShutDown Script in each of them) before closing itself. In the 5 files, the ShutDown script is a simple Close[mainfile] command. Problem is, the system doesn't work. It behaves erratically, leaving some of the files open when you would expect to only be left with the application window but no file open. Some of the 6 files are related - would that be a problem? Thanks for any help.
SteveB Posted September 7, 2002 Posted September 7, 2002 Yes, the relationship are the problem. You can call the 'Exit Application' script step from your main pgm to close the solution
alexliz Posted September 7, 2002 Author Posted September 7, 2002 Thanks, Steve. However, exiting the app isn't the most elegant way of doing things, especially when you have to wait for it to open again in a few seconds to open a different system. Surely there has to be a way to shut down a multiple file system with relationships by clicking in one place!??
kennedy Posted September 8, 2002 Posted September 8, 2002 When shutting down, I include a ShutDown Script with the main file, which closes the other 5 files (by calling 5 times the external ShutDown Script in each of them) before closing itself. In the 5 files, the ShutDown script is a simple Close[mainfile] command. I'm no expert here, but if I understand things right, it would be erratic. The Close calls the ShutDown... the ShutDown calls the Close... and so on. ShutDown is for commands you want it to run right before it closes the file... it shouldn't close the file. Try having your main file simply close the other five... those closes will call the ShutDowns in those files... which it sounds like for the moment will be empty. Just my 2 pennies worth... one of the forum gurus may set us both straight.
alexliz Posted September 8, 2002 Author Posted September 8, 2002 I understand what you mean, a sort a recurring cycle of close-call script-close-etc... I have come across systems, however, which do similar things. In "Using FileMaker Pro 5" by Richard Coulombre of The Support Group, for instance, in the sample systems on the CD accompanying the book, there is an Invoicing system made of 6-7 files, with relationships, and each file has a typical ShutDown script which is a sequence of Close [filename]'s. Each file is scripted, upon closing, to first close all the others. So my question is: how come THAT system doesn't face the same problem? Thanks, Alex.
Rigsby Posted September 8, 2002 Posted September 8, 2002 The reason the files close then open again is as said, because of relationships. To get around this, simply switch layouts. What I would recommend is a so-called farewell screen, saying goodbye to the user. Thus, there are no related fields or portals on the layout to trigger the files again. This will do it!
alexliz Posted September 8, 2002 Author Posted September 8, 2002 Man, Rigsby, thanks a lot!!!!!! It's so simple, I should have thought about it! Thanks, man! BTW, since it's six files, and most of them connected through relationships, would this mean that I should script in each of the files' ShutDown scripts to change to a 'neutral' layout in EACH of the files, and then proceed with closing? If yes, would there be a way to make the screen keep calm while this change-change-change takes place? (perhaps FreezeWindow or something? I don't really know how this command behaves...) Thanks again.
Anatoli Posted September 8, 2002 Posted September 8, 2002 It is not that difficult, just try that. Personally I am trying several ways to solve one problem. You can for example show closing screen from main file, and then minimize the files which you want to close.
falkaholic Posted September 9, 2002 Posted September 9, 2002 Yes, I just use the Close[] step to close other files in my systems. Works eveytime.
Gogargirl Posted September 17, 2002 Posted September 17, 2002 Scripting the ShutDown scripts is fine, but most users would try and close a file from the Close File command or the close file symbol ("x" in windows, or the square(?) thingy on a Mac), wouldn't they? I can't find a way to prevent them from doing this.
LiveOak Posted September 17, 2002 Posted September 17, 2002 Take a look at the SecureFM plug-in at www.newmillennium.com. This plug-in allow you to disable Quit/Close and a host of other menu option. -bd
The Bridge Posted September 17, 2002 Posted September 17, 2002 You could set the shutdown script of those files to be the files own open script. That is, when the user closes a file manually, it automatically calls the file's open script, essentially keeping it open until another file sends the "real" close command.
Gogargirl Posted September 18, 2002 Posted September 18, 2002 Thanks for these suggestions. I'll experiment a bit!
LuckyMe Posted September 19, 2002 Posted September 19, 2002 I just post the topic "Quit Filemaker", then found out the similiar topic is already posted here. Anyway I just tried the idea from Peter (The_Bridge), I ran into a infinity loop, what it does is that it open files, then close files, then open files, and on and on. Finally I had to click on the x located at the top right corner of FMP Winodws to shut down FMP. It is not work or I missed something here.
LuckyMe Posted September 19, 2002 Posted September 19, 2002 LiveOak, Do we have to have the Plug in to prevent user from closing the FMP by click x, or File>Exit?
HazMatt Posted September 20, 2002 Posted September 20, 2002 I think you might have to have a script in an external database to close down your current file. I currently don't utilize any shutdown scripts, but I have a Close button that asks if they want to close just the one file or all. If they choose "All", it runs a "Close All" script I have in Admin.fp5, which obviously closes all files, including the Admin.fp5 file (last). For now, I just encourage users to use the Close button on my layout, not the regular close button.
Recommended Posts
This topic is 8104 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