4 Replies Latest reply on May 24, 2010 6:49 PM by Ward

    FileMaker 11 opens unnecessary files -- a misunderstanding of Script Debugger behavior

    Ward

      Summary

      FileMaker 11 opens unnecessary files -- a misunderstanding of Script Debugger behavior

      Description of the issue

      I have an initialization script that conditionally performs a script in one of a dozen other files.  That is, based on the state of the database and host environment, this script does a Perform Script of a script in File1.fp7 or File2.fp7 or File3.fp7.... The Script Debugger reveals a major change in the behavior of FileMaker Pro 11 Advanced.  Before executing the first step of the initialization script, FileMaker is opening all twelve files, even though none of the files may be needed. It appears the only way to avoid the unwanted opening off all files is to put each Perform Script in a separate subscript.  Ugly! -- Ward FMP Adv 11.0v1 on Mac OS X 10.6.3

        • 1. Re: FileMaker 11 opens unnecessary files -- a misunderstanding of Script Debugger behavior
          jerrysalem

          Ward

           

          In order to do the scripts in File1.fp7, File2,fp7 etc the files need to be opened.  This is not new.

          I don't understand the description of the bug.

           

          Are you saying the files are not going to the background?  

          Perhaps you need to put a 'hide window' in the external files.

           

          Jerry

          • 2. Re: FileMaker 11 opens unnecessary files -- a misunderstanding of Script Debugger behavior
            Ward

            FileMaker certainly needs to open a file in order to perform a script in that file.  FileMaker 10 waited until the Perform Script step to open the file.  My initialization script has the Perform Script steps in If - EndIf blocks.  If a Perform Script is skipped, the file was not touched in FileMaker 10.

             

            In FileMaker 11, all files referenced in a script are opened (in the background) before the script begins execution.  You can see this in the Debugger with a Watch on DatabaseNames.

             

            After posting my original note, I found another script that does a Perform Script on one of 50+ files.  Since I can't wait for a fix to this FileMaker 11 script bug (feature?), I've tediously created 50+ subscripts, each with a single Perform Script step.

             

            -- Ward

            • 3. Re: FileMaker 11 opens unnecessary files -- a misunderstanding of Script Debugger behavior
              hschlossberg

              This is the way it has always been with Script Debugger open.  It has to be, in order to display the script names from the external files.

               

              What I think is a bug is that those opened files can never be closed without also closing the calling file.  It seems that a file should be able to be manually closed if it is not being referenced by a current script or layout object, etc.  And even though such a file automatically reopens after you close it, holding the shift key does not force it to ask for an account/password.

              • 4. Re: FileMaker 11 opens unnecessary files -- a misunderstanding of Script Debugger behavior
                Ward

                Thanks, howards.

                 

                >> This is the way it has always been with Script Debugger open.  It has to be, in order to display the script names from the external files.

                 

                That's it!  I'm surprised I never encountered this during many, many sessions in the FileMaker 10 Script Debugger.

                 

                I just ran the initialization script in FileMaker 10 debug mode, and it behaves the same as FileMaker 11.  Hindsight says I should have done that earlier and avoided our having this discusssion.

                 

                I still have a problem with my initialization script (and perhaps a plug-in) in FileMaker 11.  Now I won't be lead astray by the Script Debugger opening files that won't be used.

                 

                I've re-titled this thread to reflect my misunderstanding.