http://imagej.273.s1.nabble.com/Boolean-and-parameter-annotation-in-IJ1-macro-tp5012014p5012048.html
> annotations (i.e. //@boolean var1) and those
> declared directly in the script (var2 = true;).
Thanks for the report. This bug is now fixed [1].
few days.
> Dear IJ users,
>
> I am using the awesome @parameter annotation in an IJ1 macro to create
> simple interfaces and I observe a discrepancy between boolean created by
> annotations (i.e. //@boolean var1) and those declared directly in the
> script (var2 = true;). Below is a small macro illustrating what I mean. I
> commented the behavior on my machine (Win7 pro, FIJI 2.0.0-rc-25/1.49p;
> Java 1.6.0_24 [64-bit] )
>
> //@Boolean bool1
>
> IJ.log("bool1 is "+bool1) // boolean declared in @parameter annotation
> print as "true"
> if (bool1){ IJ.log("in test 1 : bool1 is "+bool1) }
> // this test does not pass
> if (startsWith(bool1,"true")){ IJ.log("in test 2 : bool1 is "+bool1) }
> // this test pass
>
> bool2 = true;
> IJ.log("bool2 is "+ bool2) // boolean declared in macro display as "1"
> if (bool2){ IJ.log("in test 3: bool2 is "+bool2) }
> // this test pass
> // end of the macro
>
>
> Did I do something wrong? Or is this the expected behavior and I don't get
> it?
> In Any case thanks for your feedback.
>
> Also I have a subsidiary questions about the annotations in macro if any
> one has directions to point me at.
> Is it possible to set some default value in the fields? I know it is
> possible in Java but couldn't find how to do it in macro.
> Is there a widget to create a drop-down menu with the name of open image
> windows?
>
> Thanks a lot
> Best regards,
>
> Benoit
>
>
>
> --
> Benoit Lombardot
> Bio-Image informatics, Scientific Computing Facility
>
> Max Planck Institute CBG
> Pfotenhauer Str. 108, 01307 Dresden
> room: 106 (s)
> phone: +49 351 210 2544
> fax: +49 351 210 1689
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>