5 Replies Latest reply on May 30, 2015 1:37 AM by CarstenLevin

    Model Window Bailout

      OK, a bit sloppy of me, but creating a new window using the go to related table step, I inadvertently made it a modal window with no close box and no close button. Every potential menu item of help to me was disabled.


      I was able to open a layout, one of a few I had not disabled, that had a button to run a script so debugger was a possibility. Nope, it would step through but opening the script for editing produced a disabled window. Not good.


      OK, the key is to have a menu layout with all of the needed buttons on it.


      In the end I had to abort Filemaker which is not something I like doing.


      Seems to me that Filemaker Advanced should have some means of bailing out of a locked modal window without no close buttons, etc. Did I miss this? Table view with no buttons on the layout and the three buttons disabled for the window actions.


      Is there a bailout for the developer from a locked down modal window?

        • 1. Re: Model Window Bailout

          Yeah. Don't trap yourself.   

          • 2. Re: Model Window Bailout

            What I do is put the New Window step inside of an IF statement.


            If [Full Access] (or developer account or something else)

                 New Window (with escape capabilities)


                 New Window (full modal)

            End If

            • 3. Re: Model Window Bailout

              I hesitate to admit being in a similar situation so let's just say:


              If by chance you are working in FileMaker 12, and you decide to create a pop up window in your script, and you decide to make it modal, and you decide to create it first off screen while you do some other steps, and you decide to test it but forget to add a step for moving it on screen, then this is how you can get out of that.


              First you still have access to the File Options menu, where you can specify a script trigger, which also gives you access to Manage Scripts (which is grayed out from the script menu).  You can then create a Close Window script (if you didn't already have one). 


              Second you still have access to the Custom Menus area, and you can create a custom menu, repurpose the Delete Record menu item (or one of the others that still are accessible) and point it to your close window script. You can also choose the custom menu that will be the default for this file on that screen.


              Then use the menu to run the Delete Record command which now runs your Close Window script, Whoo Hooo!!! you didn't have to force quit FileMaker!


              Don't ask me how I know this :-)


              In the above situation the close window button had not been disabled.



              • 4. Re: Model Window Bailout



                I have a close window script.  In a number of solutions I do work in off screen windows.  So if your debugging or have a script quit,  you have the same issue as a modal window.  No acess to the close window button.  The mouse just won't go to -10000 off screen.    So I use the script. 


                In most cases I still have access to the FileMaker menu Quit option.  Not graceful but should close all of the windows and quit... I think.



                • 5. Re: Model Window Bailout

                  My first step in a modal window is just to add a tiny bit of text, close, and then make it a button ... closing.

                  The same with loops. My first step is to put in a developers exit or to temporely enable the escape ability which is usually of.