Problem with Get( ApplicationVersion ) in FM Go

Discussion created by Vaughan on Feb 26, 2012
Latest reply on Feb 27, 2012 by Vaughan



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.



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


>use script de-bugger.

>That does not work here.



>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.