6 Replies Latest reply on Feb 3, 2011 6:47 AM by LSI-FileMaker-Developer

    Allow User Abort [Off] ignored on Win XP when custom menu set Close Window script used

    LSI-FileMaker-Developer

      Summary

      Allow User Abort [Off] ignored on Win XP when custom menu set Close Window script used

      Product

      FileMaker Pro

      Version

      Advanced 11.0v2

      Operating system version

      Windows XP SP3

      Description of the issue

      It is a common practice to open a new window and not want the user to close it via the OS's standard 'close window' button.  This is accomplished by way of inserting an Allow User Abort [Off] script step before a Pause/Resume Script [Indefinitely] script step and relying on layout buttons to do the rest of the work.  On solutions where a custom menu set uses a custom script on the Close menu item, the Windows version of FM ignores the Allow User Abort setting, while the Mac version respects it, resulting in the closing of the window while the script still runs.

      Steps to reproduce the problem

      It's probably just easier if you dissect this sample file:
      http://www.larsonsystems.com/window_close_bug/Test_DB.zip (8 KB)

      But, here are the important steps:
      1) Create a new database.
      2) Create a script (i.e. "Close Current Window) and assign it to the Close menu item in a custom menu set.
      3) Create a script that opens a new window, set Allow User Abort to [Off], and pauses the script.
      4) Attempt to close the window via the operating system's close window button (the red X on Windows, the red orb on Mac OS X) and observe the difference when the custom menu set is installed vs. [Standard FileMaker Menus].

      Expected result

      I expected to hear the Windows 'bong' / system beep sound and the window to remain open.

      Actual result

      The window closes, and the script remains paused.  Further actions are prohibited outside the current underlying window and the program appears to be frozen (especially if the status area is hidden as is often the case).  If the user accidentally hits the Enter or Return button, the script resumes, and depending on how fault-tolerant the script is, bad things can happen.

      Exact text of any error message(s) that appear

      N/A.

      Configuration information

      Tested on Windows XP SP3 and Mac OS X 10.5.8, both using FileMaker Pro Advanced 11.0v2.

      Workaround

      Untested, but conceivably I could use some global variables that my "Close Current Window" script looks at to cancel the close operation.  But that's messy and undesirable.