dbTalk Databases Forums  

How to activate shutdown script on exiting app.

comp.databases.filemaker comp.databases.filemaker


Discuss How to activate shutdown script on exiting app. in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
David Robins, MD
 
Posts: n/a

Default How to activate shutdown script on exiting app. - 04-26-2007 , 12:50 AM






FM 8.0v3 Adv on a Mac:

I have set the file options: When closing a file perform script" named
Shutdown.

I have a button on a layout that runs the "exit application" script step.

The script steps "exit application" and "close file" do not run the
shutdown script.

However, closing the file manually (clicking the window closure corner
button, or the File>Close menu) or quitting FileMaker do activate the
shutdown script.

Why the difference?


Reply With Quote
  #2  
Old   
Helpful Harry
 
Posts: n/a

Default Re: How to activate shutdown script on exiting app. - 04-26-2007 , 01:39 AM






In article <C2558BC2.18A10%trashadd5 (AT) bigfoot (DOT) com>, "David Robins, MD"
<trashadd5 (AT) bigfoot (DOT) com> wrote:

Quote:
FM 8.0v3 Adv on a Mac:

I have set the file options: When closing a file perform script" named
Shutdown.

I have a button on a layout that runs the "exit application" script step.

The script steps "exit application" and "close file" do not run the
shutdown script.

However, closing the file manually (clicking the window closure corner
button, or the File>Close menu) or quitting FileMaker do activate the
shutdown script.

Why the difference?
There shouldn't be a difference. If you've set the Document Preference
option to run a Closing script, then that script should be run no
matter how the file is closed - a quick test in FileMaker 5.5 of
various "quit" and "close" methods proves this.

First, check that the preferences is running the correct script. Then
check that the script is not being skipped for some reason (a
mismatching If test for example).

It's possible you've found a bug in FileMaker 8, but I wouldn't have
thought so.

Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #3  
Old   
David Robins, MD
 
Posts: n/a

Default Re: How to activate shutdown script on exiting app. - 04-26-2007 , 11:52 PM



I found one difference:

If my Quit button directly runs the "exit application" step from the button
setup menu, the shutdown script runs fine.

If my Quit button runs a script that contains only the script step "exit
application", shutdown scrip does not run, it just exits. With the Debugger
is running, it does not even enter the shutdown script itself.




On 4/25/07 11:39 PM, in article
260420071839372305%helpful_harry (AT) nom (DOT) de.plume.com, "Helpful Harry"
<helpful_harry (AT) nom (DOT) de.plume.com> wrote:

Quote:
In article <C2558BC2.18A10%trashadd5 (AT) bigfoot (DOT) com>, "David Robins, MD"
trashadd5 (AT) bigfoot (DOT) com> wrote:

FM 8.0v3 Adv on a Mac:

I have set the file options: When closing a file perform script" named
Shutdown.

I have a button on a layout that runs the "exit application" script step.

The script steps "exit application" and "close file" do not run the
shutdown script.

However, closing the file manually (clicking the window closure corner
button, or the File>Close menu) or quitting FileMaker do activate the
shutdown script.

Why the difference?

There shouldn't be a difference. If you've set the Document Preference
option to run a Closing script, then that script should be run no
matter how the file is closed - a quick test in FileMaker 5.5 of
various "quit" and "close" methods proves this.

First, check that the preferences is running the correct script. Then
check that the script is not being skipped for some reason (a
mismatching If test for example).

It's possible you've found a bug in FileMaker 8, but I wouldn't have
thought so.

Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #4  
Old   
Helpful Harry
 
Posts: n/a

Default Re: How to activate shutdown script on exiting app. - 04-27-2007 , 01:10 AM



In article <C256CF8C.18EBD%trashadd5 (AT) bigfoot (DOT) com>, "David Robins, MD"
<trashadd5 (AT) bigfoot (DOT) com> wrote:

Quote:
I found one difference:

If my Quit button directly runs the "exit application" step from the button
setup menu, the shutdown script runs fine.

If my Quit button runs a script that contains only the script step "exit
application", shutdown scrip does not run, it just exits. With the Debugger
is running, it does not even enter the shutdown script itself.
It shouldn't do that ... or at least it doesn't in FileMaker 5.5 - no
matter how you quit or close, the Closing script is always run.

A work around would of course to change the button's script to run the
Shutdown script as well.
ie.
{whatever else the button may need to do}
Perform Script [Shutdown]
Quit Application

But be aware (if it makes a difference) that the Shutdown script might
run twice using this method.



Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.