Dear Jan,
Not only your proposed solutions will induce a lack of clarity on the side of 
the users (which won't be me).
But also and especially it would require a double user action (which I always 
try to limit as much as possible) where the 3 buttons option will only require 
a simple action.
A real alternative option would be to transform the given macro code (about 400 
lines) into a plugin given that in the Java langage such an implementation is 
possible.
In fact it is really too bad that the getBoolean method is modal...
I was really happy to find out that such the 3 buttons dialog box was already 
implemented within the macro langage, but my happyness came down right away 
when I figured out that the obtained dialog box was modal.
My best regards,
Philippe

----- Mail original -----
De: "Jan Valecka" <[email protected]>
À: "imagej" <[email protected]>
Envoyé: Jeudi 14 Décembre 2023 14:17:17
Objet: Re: NonBlocking getBoolean method

Hello,
is a new method really necessary? You can achieve almost the same by using a 
radio button in the non blocking dialog:

items = newArray("Yes", "No");
Dialog.createNonBlocking("Title");
Dialog.addRadioButtonGroup("label", items, 1, 2, "No");
Dialog.show();
answer = Dialog.getRadioButton();
print(answer);

To get a boolean value, you can just use a checkbox instead of radio button:

Dialog.createNonBlocking("Title");
Dialog.addCheckbox("label", false);
Dialog.show();
answer = Dialog.getCheckbox();
print(answer);

Best regards, 
Jan Valecka

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

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

Reply via email to