Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8104 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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. mad.gif 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. smile.gif

Posted

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!??

Posted

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.

Posted

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.

Posted

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!

Posted

laugh.gif 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.

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.