Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 3922 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

We have a GO solution that runs on the separation model.  The interface file is local to the device with the data streaming down from a hosted related file.

 

Using a technique that we read about in Filemaker 12 Developer Reference (Bowers and his crew always produce amazingly useful stuff) we are attempting to have upgraded interface files pushed out to the iOS devices automatically as needed.  We modified the technique a little and maybe that's what's causing the problem...

 

Essentially, in the hosted file we have a container field that holds the latest interface file.  There is also a field that contains the latest version number in the data file.  When an interface file on an iOS device launches the OnOpen script compares the local version number with latest version number in the data file.  If the iOS version is behind it calls a script in the data file which is supposed to in turn call a subscript in the local interface file that will close the interface file and then export the field contents of the file field from the data file to the iOS device, writing over the outdated local file, and opening the newly exported updated file.

 

For some reason we can't get the local interface file to close, so it won't allow itself to be written over.  I was hoping someone might have some suggestions.  I can't get the Open URL step to trigger the script that closes the file.  Maybe the URL is wrong.  Maybe there is a better way to do this.

 

The OnOpen script on the iOS local file:

 

Go To Layout ["zResources" (zResources)]

If[zResources::VersionNumber < zResourcesHostFile::LatestiPhoneVersionNumber)

Show Custom Dialog ["Update Version" ; "Your local version of the interface is out of date."]

If(Get(LastMessageChoice) = 1

      Perform Script ["Update iPhone Version" from file; HostFile

End If

 

The Update iPhone Version in the HostFile:

 

Open URL [No dialog; "fmp://Interface.fmp12?Script=CloseFile"]

#

#

Set Variable [$Filename; Value: "file:Interface.fmp12"]

Export Field Contents [zResoucesHostFile::iPhoneFile ; $Filename"]

Open URL [No Dialog; "fmp://~/Interface.fmp12"]

 

The issue seems really to be getting the local interface file to close.  It won't allow an overwrite of an open file.  I'd welcome any thoughts on what might be amiss here.

 

Thanks in advance.

 

 

 

  • Like 1
  • 1 year later...
Posted

Struggling with the same issue. FMGo13 with hosted FM12 Client Downloader.

 

I split the process in two, thinking that the calling iOS file's script (which lists in the stack) is keeping the local file open. So, I open the Client Downloader and land on an Update layout. No script is running at this point. All works fine on iMac, but on FMGo, the local UI file refuses to close (Error 13 - File or object is in use).

 

I removed the Client Updater's EDS to the local UI file and tried OpenURL, but that too, fails.

 

Going in circles...

 

EDIT: resorted to a local file that handles the export of containers and closing the local files. sigh.

Posted

And I'm back...still cannot get the local iPad file to close. Reading absolutely every post on this topic. Ya know it's one stupid script step I'm overlooking!

Posted

Thanks for responding here and on TechNet. I'll be at this again tomorrow, and will try Close Window.

 

Right now I have three local files and a hosted file with the new binaries. The 3 local are : UI, Data, and Sync. UI has EDS to Data and Sync has EDS to Host UI and Host Data, local UI and Data.

 

I'd like to not use a local updater, but rather have the local UI call the hosted Client Downloader. However, it seems that since the local UI calls the hosted Client Downloader, that script is in the call stack and prevents the hosted Client Downloader from closing the local UI (Data).

 

What files and EDS should I have, at minimum?

Posted

You need two script on the hosted file. The first one is a script that puts the hosted file on a blank layout with one button labeled with something like Continue with Update. The UI file will call this script. The button executes the following Script

Close Window (Interface)

Export field contents

Open (Interface)

This is a little simplified but it should get you where you need to be.

Posted

I'm trying to avoid two buttons for Update. I want them to click one button, OK a Custom Dialog to proceed and off we go. Sounds like you're saying that I need an Update button in the local UI, and a Continue in the hosted file?

 

 

I need to use FMP Protocol to close the interface file, correct, bcs the hosted file cannot have an EDS to the local UI.

Posted

Well, saga continues. I have tried to have the local UI call the hosted file's script which closes the local UI and then exports. I didn't want to stop at the hosted file and have the user click Continue Update and so I tried the InstallOnTimer trick as outlined here by Colibri. Doesn't work for me (Colibri was in .fp7).

 

Now I'll give up and stop the user at the hosted file and have him click "Continue Update." Let's see if that helps.

Posted

omg - so now I get an Error 13, but it does actually close and overwrite the local UI.

Posted

Well, victory! Had to use two button update, though, and File Close worked for me, but Close Window didn't.

This topic is 3922 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.