February 23, 201214 yr // 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.
February 24, 201214 yr 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?
February 24, 201214 yr Author David it was a test of concept so that multiple things could be the result of a single function.
February 27, 201214 yr 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.
Create an account or sign in to comment