2 Replies Latest reply on Feb 27, 2012 4:09 AM by Vaughan

    Problem with Get( ApplicationVersion ) in FM Go

    Vaughan

      Hello

       

      I have a file that has both a desktop (FM Pro) and iPad (FM Go) interface. I use a startup script with a conditional that looks at the first word returned form the Get( ApplicationVersion ) function.

       

      This normally works perfectly, and I have been using it to distinguish between desktop, server-side and iwp clients for a couple of years without issue.

       

      Until now.

       

      If I make a compressed copy of the file, load it onto the iPad and open it, it seemed to ignor the fact it was in Go and open to the desktop interface. However if I open the file in FMP, close it, then load it onto the iPad it works.

       

      >look

      >You are in a iPad in a maze of twisty compressed copies, all alike.

      >

      >use script de-bugger.

      >That does not work here.

      >

      >inventory

      >You are carrying: a torch, a rusty sword, the show custom dialog.

      >

      >hello sailor

      >nothing happens.

      >

       

      <time passes>

       

      OK I have sorted it out. Quite an adventure.

       

      It is a combination of layout-based script triggers and the fact that a file opens in the last layout it was saved in.

       

      When I invoke the save a compressed copy command, the file is in the desktop layouts. These layout have cunning and devilish layout-based script triggers to snsure the correct layouts are selected for mode, view and table occurrance. The new compressed file will, by default, open to the desktop layout when first opened. After that the script triggers seem to prevent the correct iPad layout from being changed to.

       

      Opening the file in FMP Pro "fixes" the problem because I have an onLastWindowClose script that changes to a blank layout with no script triggers, no fields, etc.

       

      The solution to my problem is to set the File Options to "switch to layout" to the minimal balnk layout.

        • 1. Re: Problem with Get( ApplicationVersion ) in FM Go
          Malcolm

          These layout have cunning and devilish layout-based script triggers to snsure the correct layouts are selected for mode, view and table occurrance.

           

          Interesting. I've recently used a combination of blank layouts and script triggers to support program navigation. The main idea is to provide users with access to the status bar without having to lock down the pop-up tool bar. The blank layouts all have nice names corresponding to the modules in the database. All other layouts are hidden.  When the user selects them they are taken to the blank layout. An onLayoutEnter script is triggered which determines which layout we really want to show them and they are immediately transferred.

           

          It works like a charm.

           

          Malcolm

          • 2. Re: Problem with Get( ApplicationVersion ) in FM Go
            Vaughan

            The problem is that once in the "desktop" interface, the script triggers and custom menus don't allow the change into any other set of layouts other than those for th desktop. Too succesful.

             

            The newly compressed file opens in the desktop layout and things consipre to keep them there. This is good for the desktop users but became a trap for the iPad users if and only if the file was saved while on a desktop layout. If saved on a blank layout it is fine.

             

            Setting the file to change to the "blank" layout solves the problem.