john renfrew Posted February 23, 2012 Posted February 23, 2012 // ChooseHome() // 10_06_10_JR WORKING // v1 import javax.swing.JFileChooser chooser = new JFileChooser() chooser.setFileSelectionMode( JFileChooser.DIRECTORIES_ONLY ) chooser.setCurrentDirectory( new File(" ") ) chooser.setDialogTitle( "Select the HOME folder" ) if( chooser.showOpenDialog( null ) == JFileChooser.APPROVE_OPTION ) { home = chooser.getSelectedFile().getAbsolutePath() // comment out next line and it is fine fmpro.evaluate('Let($$' + 'homeDIR' + ' = "' + home + '"; 1)') return home } else {} return false and ideas why the above is giving me the following error?? Windows XP, FM 11.04 SM 4.131 Has been working ( I think) till the latest SM update java.lang.IllegalStateException: FileMaker called plugin on thread: Thread[main,5,main]; but plugin is trying to call back to FileMaker on a different thread: Thread[AWT-EventQueue-0,6,main]. This is not allowed.
David Wikström Posted February 24, 2012 Posted February 24, 2012 I get the same error on on OS X 10.6.8, FMPA 11.0v4, SM 4.131. Looks like thing that gave an error in 4.13 but was fixed at least for some functions in 4.131. That being said, I'm curious as to why you want to use the fmpro.evaluate just to set a variable? Interestingly, the global variable does get set even with the erro.... Maybe that's a clue?
john renfrew Posted February 24, 2012 Author Posted February 24, 2012 David it was a test of concept so that multiple things could be the result of a single function.
wbasham Posted February 27, 2012 Posted February 27, 2012 We have a new version of ScriptMaster (4.132) that should fix this issue. It has yet to be live deployed but if you'll contact me via email I'll send you a copy of the plugin to test.
Recommended Posts
This topic is 4721 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 accountSign in
Already have an account? Sign in here.
Sign In Now