Login  Register

IJ.renameResults(summaryTitle,"Results") seems to have a timing issue

Posted by Aryeh Weiss on Jul 21, 2019; 4:59pm
URL: http://imagej.273.s1.nabble.com/IJ-renameResults-summaryTitle-Results-seems-to-have-a-timing-issue-tp5022334.html

When I use:
IJ.renameResults(summaryTitle,"Results")

It does not reliably work in a script unless I put a delay into the code.

So:
IJ.renameResults(summaryTitle,"Results")
time.sleep(1)

makes the code work. Without the delay, the rename does not always work.

This is a difficult problem to describe and reproduce,, but maybe
someone has some ideas.
Maybe the static IJ methods require time to complete their "side
effects" before continuing?

--aryeh

--
Aryeh Weiss
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel

Ph:  972-3-5317638
FAX: 972-3-7384051

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html