Greetings Norbert,

Your scenario sounds like a race condition. Each command tends to work on
the current object, which may inadvertently change. I assume that table
text fields are nonselectable and noneditable. I would suggest...

Put the Table.update after all updates of the table(s).
Put a wait(0.2) after everything that needs to complete asynchronously.
For debugging, change the addString to say addCheckbox. If my theory is
correct, the checkbox will remain usable.

Enjoy,

Fred


On Thu, April 11, 2024 1:35 pm, Norbert Vischer wrote:
> Hi Michael and Gabriel,
>
> meanwhile I can reliably reproduce the bug, even after restarting my Mac.
> At least after running the following macro a second time, the problem
> appears, and "hello" is not highlighted and not editable.
> (Also tried Fiji).
>
> Best regards, Norbert
>
>
>
> //===
> Table.create("tmp-B");
> Table.update;
> waitForUser;
> Table.setColumn("Nums", newArray(100));
> close("ABC");
> newImage("ABC", "8-bit ramp", 300, 300, 1);
> selectImage("ABC");
> showMessage("Click OK to continue");
> Dialog.create("My Dialog");
> Dialog.addString("Enter String", "hello");
> Dialog.show;
> //===
>
>
>   IJ.getFullVersion: 1.54j13
>   IJ.javaVersion: 8
>   IJ.isJava18(): true
>   IJ.isLinux: false
>   IJ.isMacintosh: true
>
>>
>> On 11. Apr 2024, at 17:36, Gabriel Landini <[email protected]> wrote:
>>
>> Hello Norbert,
>> I seem to be able to run it without problems under linux and Java 17.
>> Regards
>>
>> Gabriel
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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

Reply via email to