5 Replies Latest reply on Sep 22, 2009 1:47 PM by ralvy

    Closed window shows when reopening file

    ralvy

      Title

      Closed window shows when reopening file

      Post

      On a given layout, I have a button that calls another window, and waits with an indefinite pause. That second window's layout has a button that halts the first script and closes the second window. This all works fine.

       

      What I notice, however, is that if I exectuted the above procedure during a given session, and then closed the solution completely, the next time I open the solution, I see the above called window for a second,and then I see the initial layout the file is supposed to display (based on a startup script). 

       

      Why would I see the called window when reopening the solution? That window was closed by a script. It never appears in the list of windows when after the script calls it in the routine outlined above, but it definitely appears for a second when I reopen the solution. Does this make sense?

        • 1. Re: Closed window shows when reopening file
          kapitaen_1
            

          when a .fp7 is opened, fmp will allways show the layout that has been open when the file has been closed the last time, then it executes the start script.

           

          Try either...

           

          set the desired layout as start layout, and have your start script too.

           

          or

           

          the close script should show the layout that is supposed to be the start layout, and then close.

           

          greetings from germany

          chris 

          • 2. Re: Closed window shows when reopening file
            ralvy
              

            I have all three taking the user to the correct layout:

             

            Starting layout

            Starting script

            Closing layout

             

            Still, they see the other layout for a split second before the intended layout is loaded. I have a feeling this is a bug. I know that there's a known bug with called windows in FMP 10 (which was not present in FMP 9), where memory is not released fully when called windows are closed, but this seems unrelated.

            • 3. Re: Closed window shows when reopening file
              kapitaen_1
                

              last try, if this doesnt work i dont know ;-(

               

               

              try to open the startup layout in layout mode, go back to display mode. close the file.

               

               

              or...

               

               

              is there something in the startup script that does something like...

              goto layout not_my_start_layout

              do something

              goto layout my_start_laout

               

               

              or...

              how is the file opened? windows explorer doubleclick, from the open menu inside fmp, or is it opened from another fp7 file? in the last case, have a look at what is scripted there.

               

               

              if you find a solution yourself, please post it.

               

               

              greetings from germany

              • 4. Re: Closed window shows when reopening file
                philmodjunk
                  

                Have your on file close script also close the window. That way, if the user quits filemaker with the small window open, it will still be closed.

                • 5. Re: Closed window shows when reopening file
                  ralvy
                     Now that I look closely at it, I think it's now working okay with all three parameters pointing to the desired layout (startup layout, startup script, shutdown script). What was missing earlier was the startup layout.