Login  Register

bug with log window

Posted by Gannier, François on Sep 17, 2019; 7:38am
URL: http://imagej.273.s1.nabble.com/bug-with-log-window-tp5022446.html

Dear all (and mostly Wayne and Michael),

Since version 1.52 (until the 1.52q48) , I found a annoying bug when I first open the log window.
To show this, I create a simply 'action tool'.

macro "Test Bug Action Tool - C000T1g06BT8g06uTeg06g" {
    run("Confocal Series (2.2MB)");
    videoID = getImageID();
    run("Plot Z-axis Profile");
    plotID = getImageID();
    IJ.log("loaded...");
    selectImage(plotID);
    if (isActive(plotID)) print("true"); else print("false");
    eval("script","WindowManager.getActiveWindow()");
    Vaxis = eval("script","WindowManager.getActiveWindow().getPlot().getLabel('y')");
    print(Vaxis);
}

with version prior to 1.52, you get :
    loaded...
    true
    confocal-series.tif-0-0
    Mean

from version 1.52, you get the first time:
    loaded...
    true
    ij.text.TextWindow[frame0,0,701,410x298,layout=java.awt.BorderLayout,title=Log,resizable,normal]
    TypeError: WindowManager.getActiveWindow().getPlot is not a function in <eval> at line number 1

and the next time (with the log window still opened)
    loaded...
    true
    confocal-series-1.tif-0-0
    Mean

Since version 1.52, the Log window stole the focus when it first opens and doesn't give back to the previous even after the selectImage function.
What is surprising is that the function isActive says that the plot windows is active in each case.

Best regards,
François

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