Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

Making a script wait for a GUI to stop running before returning?


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

Recommended Posts

  • Newbies
Posted

I have a Jar that contains a swing GUI that I wish to run from a Groovy script, but when I try to make the script wait for the GUI thread in any way, Filemaker and a partially opened window for the Swing app becomes non-responsive and I have to force close it. I am working on OS X, but writing a plugin that will be used on both OS X and Windows.

The Gui ends up possibly saving a file that the script needs to check whether it was made or not to continue. It's a user-choice and if the file isn't saved, the script can end, but if the file is there, the script needs to continue, but I cannot find a way to successfully open the GUI and prevent the script from finishing.

Somethings I have tried are various versions of thread synchronization, causing the script to wait until it is notified by the GUI, as well as just a simple while(gui.isVisible()). All of these result in both the app and filemaker/scriptmaster becoming unresponsive.

It seems to me that there is an issue with multithreading with Groovy and Scriptmaster, but I cannot find a way around this.

Does anyone have any other clues on how this could be done.

Thanks in advance.

This topic is 4664 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.