Login  Register

Re: Macro run problem?

Posted by Amelie Marzin on Jun 20, 2011; 1:36pm
URL: http://imagej.273.s1.nabble.com/Re-Macro-run-problem-tp3684172.html

Hi,

I finally found the problem (but not the entire solution).

I created a java toolbar, and my macros are launched in actionPerformed(ActionEvent e) (when the user select a button).

When I tried to launch this way a macro which contains a getCursorLoc(x,y,z,flags) OR a plugin which implements MouseListener, the entire application froze.

I noticed that if I launch my macro (or my plugin) from the run() method of my toolbar, it works !

So I am currently writing a solution with threads. It's OK when I just launch the macro or the plugin, but if I want to do something after the execution, I still have difficulties to wait for my threads to end... I will persist !