10 Replies Latest reply on Jul 18, 2013 7:11 PM by doughemi

    Freeze Window anomaly

    doughemi

      I am converting an FM11 solution to FM12 and have added a little eye candy in the form of a splash screen. On my local FMS installation, this works fine: the splash screen is displayed for a couple of seconds, then the main layout appears.

       

      On the same file hosted remotely, though, the splash screen appears, then a blank gray window is shown for 7 or 8 seconds, and then the main layout is seen.

       

      Here is my startup script:

       

      Go to Layout ["Splash"]

      Allow Formatting Bar [Off]

      Show/Hide Toolbars [Hide]

      Freeze Window

      Set Variable [$$Acctname; Value:Get ( AccountName )]

      Set Variable [$$AcctPriv; Value:Get ( CurrentPrivilegeSetName )]

      Perform Script ["Set Renewal Dates"]

      Set Field [globalsAdminSB::g.accountname[]; Get ( AccountName )]

      Set Field [globalsAdminSB::Currentyear[]; Year ( Get ( CurrentDate ) )]

      Set Field [globalsAdminSB::g.ExpirationDateList[]; GetAsText(Date(Month(globals::g.LastExpirationDate) - 5; 0; Year(globals::g.LastExpirationDate))) & ¶ &

      GetAsText(Date(Month(globals::g.LastExpirationDate) - 2; 0; Year(globals::g.LastExpirationDate))) & ¶ &

      globals::g.LastExpirationDate & ¶ &

      globals::g.NextExpirationDate]

      Set Field [globalsAdminSB::g.OtherExpirationDate[]; globals::g.NextExpirationDate]

      Set Field [globalsAdminSB::g.StateFilterList[]; "—ALL—¶" & ValueListItems ( Get ( FileName ) ; "States")]

      Allow Formatting Bar [Off]

      #Now go to proper layout depending on user privileges

      If [Get ( CurrentPrivilegeSetName ) = "Membership Sec"]

      Go to Layout ["MS_member entry"]

      Perform Script ["CurrentMembersOnly"]

      Go to Layout ["MS Switchboard"]

      Refresh Window []

      Show/Hide Toolbars [Hide]

      Adjust Window [Resize to Fit]

      Set Variable [$$return_layout; Value:"Admin Switchboard"]

      Exit Script []

       

      Is there a way to make the splash screen stay on until the MS Switchboard layout is displayed?

        • 1. Re: Freeze Window anomaly
          jormond

          When you say remotely, are you talking about remote ( on the same network ) or remote ( WAN, hosted outside your network )?

          • 2. Re: Freeze Window anomaly
            SteveMartino

            I know this is obvious, and not exactly the same situation, but I noticed that even though I scripted a Start Screen, another window would still pop up. In File Options > Open tab, I had a layout selected, different from the Start Screen.  So in that split second as the file opened and while the scripted executed, I saw that incorrect layout, until I unchecked the box.  I'm only mentioning this because you said you're converting, and didnt know if this worked the same way in FM11.

            • 3. Re: Freeze Window anomaly
              IT_User

              Is this "MS_member entry" the blank gray screen or is it something else? (Like what is noted in File Options)

               

              If it is the "MS_member entry" that is the grey blank screen, you can probably switch the splash screen to be based on the same Table Occurence, since you are using global fields that can be referenced from anywhere.  (I'm not sure what you have at the end of this script or in the different Perform Scripts, though, to know if it is all dealign with global fields.)  Then you would not need to use a Go to Layout ["MS_member entry"].

               

              Or if you need to switch Table Occurences, you can create a new layout that looks like the Splash screen, but based on the Table Occurence of the "MS_member entry" layout.

              • 4. Re: Freeze Window anomaly
                doughemi

                WAN via a hosting company.

                • 5. Re: Freeze Window anomaly
                  taylorsharpe

                  How Freeze works was changed between 11 and 12.  This was done mostly to take care of the problem in 11 and before, where the UI took forever and you would need to freeze the window or the script would go very slow.  So 12 is now trying to automatically handle this for you, which generally is good.  But not in your case.  You could always use a Pause, but then nothing is happening.  You could pause, then open another window with negative pixel values (e.g., -1000, -1000) so that the window is opened off screen, it does what it needs to do, and then closes leaving the window with the logo up all during that time.  I'm not sure if that will work on FileMaker Go, but I know it will on PCs. 

                  • 6. Re: Freeze Window anomaly
                    Stephen Huston

                    Whatever you have on your splash screen is having to travel across the WAN connection before the layout refresh can complete. If you can create your splash using FM-native drawing objects rather than another form of graphic, it should speed up the screen draw considerably.

                     

                    Or at least be sure any image has been optimised to the minimum resolution needed for display to reduce the amount of image data being cached.

                    • 7. Re: Freeze Window anomaly
                      doughemi

                      Your (and SteveMartino's) questions gave me some hints to try:

                       

                      Splash is set in File Options... Open dialog

                       

                      I added SetWindowTitle script steps to the script before going to the Splash, MS_member entry, and MS Switchboard layouts.  The splash screen I see is apparently the one set in File Options, as the window title does not change. The gray blank window shows each of the three titles for an approximately equal amount of time, before rendering the MS Switchboard layout. Based on that, I don't think your suggestion about changing TOs of the layouts will do anything. (Splash is based on the globalsAdminSB To to set the (non-global) fields there; MS_member entry is based on a different table, and MS Switchboard returns to the globalsAdminSB TO)

                      • 8. Re: Freeze Window anomaly
                        doughemi

                        Thanks, Taylor, that did the trick. Another eleventhink to unlearn!

                        • 9. Re: Freeze Window anomaly
                          jormond

                          doughemi,

                          I would be great if you could post a sample file (not necessarily your solution, but a generic one) to show the two behaviors.  Learning the intriqute details of changes in behavior is always good. 

                          • 10. Re: Freeze Window anomaly
                            doughemi

                            Josh, I'm on deadline to implement this upgrade this weekend, but I'll try to whip up a sample next week.