Jump to content

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

Recommended Posts

Posted

I am using the current v 4 of SM.

My application uses the SelectFile function. I "Registered" it using the 3rd method (as specified in the User's Guide) and it works great in development mode. (I develope in OSX)

I compiled my app for both Windows and Mac with different experiences.

First, on the Mac, when the script which uses the SelectFile function is called, it acts as expected and allows me to 'browse' for the file I desire. Great. But, about 1/2 the time I get the dreaded 'spinning beach ball'. I can still select a file and select 'Open' and everything works. But, "Why the spinning beach ball?' In any event, it works but it is actign weird....sometimes.

I have tried putting 360works_scriptMaster.FMPlugin in the /Extensions folder. And, I tried removing the same plug in. It doesn't seem to make a difference.

The Windows version runs as expected. Same source code.

Thanks for reading. I look forward to your thoughts.

Ron

Posted

Make sure that you have the function in question checked as a GUI function.

RegisterGroovy( "SelectFile" ; "import java.awt.*;¶

import javax.swing.JOptionPane;¶

What does 'checked as a gui function' look like? How do I do it?

This is my 'registration code':

A Gui statement was added at the end by Obiena but it doesn't seem to make a difference.

String title = \"Select Source\";¶

FileDialog dialog = new FileDialog(JOptionPane.getRootFrame(),title);¶

dialog.show();¶

if (dialog.getFile() != null) {¶

return dialog.getDirectory() + dialog.getFile();¶

} else {¶

return 0;¶

}" ; "isGUI=true" )

Posted

I think I 'got it'.

If I set Allow User Abort [On] everything works as expected.

If I set Allow User Abort [Off] I get the spinning ball. (Unless I answer the preceeding dialog with an OK within 2 seconds)

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