May 31, 201114 yr Hi, I like to call call the "actionPerformed" of the button a FileMaker script in the following code This does not work! What am I doing wrong? Thanks for your help CODE: import javax.swing.*; import java.awt.event.*; new FensterWegImplementsAll(); class FensterWegImplementsAll extends JFrame implements WindowListener, ActionListener { public FensterWegImplementsAll() { setLayout(null); setSize( 400, 400 ); addWindowListener( this ); setVisible( true ); JButton btn_1 = new JButton("TOC"); btn_1.setBounds(10,10,100,25); btn_1.addActionListener(this); add(btn_1); } public void windowClosing( WindowEvent event ) { dispose(); } public void windowClosed( WindowEvent event ) {} public void windowDeiconified( WindowEvent event ) {} public void windowIconified( WindowEvent event ) {} public void windowActivated( WindowEvent event ) {} public void windowDeactivated( WindowEvent event ) {} public void windowOpened( WindowEvent event ) {} public void actionPerformed(ActionEvent event) { fmpro.performScript("ScriptMaster","TOC",""); } }
June 3, 201114 yr I believe your problem is the fmpro object does not exist in the scope of your class. You can pass the fmpro object to your FensterWegImplementsAll object when you create it; then the actionPerformed method needs to use the fmpro object that was passed into your class.
June 6, 201114 yr Author I believe your problem is the fmpro object does not exist in the scope of your class. You can pass the fmpro object to your FensterWegImplementsAll object when you create it; then the actionPerformed method needs to use the fmpro object that was passed into your class. Thanks it functions. But now i have the same problem like in this Thread: http://fmforums.com/forum/topic/74209-fmpro-object-taking-a-long-time-to-respond/ The fmpro Objekt d'ont respond regulary! Did you have a solution for this problem? Thank you very much!
June 7, 201114 yr I am using the fmpro object similar to how I suggested in my last post, except that I compiled my code into a jar file. I haven't had any problems like mentioned in the post you linked to.
June 8, 201114 yr Author Hello dansmith65, thanks for your answer. I compilet my code / class in a Jar-File as you sad. In Filemaker i just use the following call to make an instanse of my class: CFMMenue fen = new CFMMenue(fmpro); and i have the same problem! Filemaker d'ont respond sometimes and sometimes takes a lot of time bevore executing the called Filemaker-Script. Did you an idea about this problem? or another solution? The background is to make a bether dynamic navigation of our filemaker solution (f.e.: with JTree). Thanks for your help !
June 10, 201114 yr I hadn't connected it before, but I think I actually did experience a similar issue. I was able to resolve it by setting thread priority: http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Thread.html With default priority (6), the process I was running could be delayed by a half hour or more when FileMaker was not the active window. When FileMaker was active, it typically responded with little delay. Try setting it to 9 and see if that works for you.
June 16, 201114 yr Author I hadn't connected it before, but I think I actually did experience a similar issue. I was able to resolve it by setting thread priority: http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Thread.html With default priority (6), the process I was running could be delayed by a half hour or more when FileMaker was not the active window. When FileMaker was active, it typically responded with little delay. Try setting it to 9 and see if that works for you. I used a Thread und set the priority with different values. But i habe always the same problem another idea ? thanks!
June 22, 201114 yr Have you tried Filemaker 11 ?. Maybe it works properly in that. Or maybe try not invoking from the EDT, so run it from a new Thread? I dunno, I haven't solved it yet. I reckon what would be super cool too would be if you embed your JTree into a filemaker container rather than as a separate window...
July 6, 201114 yr Author Have you tried Filemaker 11 ?. Maybe it works properly in that. Or maybe try not invoking from the EDT, so run it from a new Thread? I dunno, I haven't solved it yet. I reckon what would be super cool too would be if you embed your JTree into a filemaker container rather than as a separate window... i tried with Filemaker 11 and had the same problem. But now i know the problem :-) I was working with a Window 64 Bit version and that was the problem! With Windows 32 Bit it is working just fine :-) Your idea with the FM container is nice too, i will try it. Thansks!
July 6, 201114 yr I reckon what would be super cool too would be if you embed your JTree into a filemaker container rather than as a separate window... Did someone succeed in this? As I can see from the documentation of ScriptMaster this would mean we would need to create some kind of FM Object or a File, all the other types would return or a simple String, Image or Number.
July 6, 201114 yr Did someone succeed in this? As I can see from the documentation of ScriptMaster this would mean we would need to create some kind of FM Object or a File, all the other types would return or a simple String, Image or Number. It isn't possible as far as I know... but it would be cool if it was possible . The only way I thought of doing it was loading an applet in a web viewer... but then there are probably a million problems with that . I've tried tracking the windows in filemaker and then rendering a frameless window over the top, but that also proved too complicated .
Create an account or sign in to comment