Re: Dialog.addChoice with Variables / Variables in an Array?
Posted by
Gabriel Landini on
Jul 30, 2014; 3:03pm
URL: http://imagej.273.s1.nabble.com/Dialog-addChoice-with-Variables-Variables-in-an-Array-tp5008965p5008975.html
On Wednesday 30 Jul 2014 07:54:49 you wrote:
> Gabriel Landini wrote
>
> > Green is a variable, "Green" is a string, so change the above to:
> >
> > choices = newArray(Green, Red);
>
> Thanks for your reply, but I already tried that, and when I do so the
> choices in the dialog box are both shown as "NaN", and I also recieve "NaN"
> from the print function.
So strange. Your modified example works fine here.
Green = "File1";
Red = "File2";
choices = newArray(Green, Red);
Dialog.create("Test");
Dialog.addChoice("Slide 1", choices);
Dialog.show();
Result = Dialog.getChoice();
print(Result);
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html