macro passing BOOLEAN arguments problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

macro passing BOOLEAN arguments problem

nicola76b@libero.it
Hi,
Fisrt of all sorry for english..
i write a java plugin for imagej, and i have many problem to pass boolean argument in a macro.
plugin work correctly with a Generic Dialog with many controls. When i try to call it with a macro, arguments are set correctly, but NOT BOOLEAN ARGUMENTS..
I note (after spend MANY time..) that arguments in macro MUST be write completely in LOWER-CASE, but since i add boolean argument, his value is always set to false (default value..)

Here is my macro:
(only attention to boolean "waitanswer" value)

-------------------
cmd = "?acc x";
cmd = "'" + cmd + "'";
run("eSlideLStepCtr plugin", "movement=Exec waitanswer=true genericcmd=" + cmd);
--------------------------

probably is wrong "true" value (but i also try with "True" and "1")

Any Ideas?? Thanks
 
     Nicola
Reply | Threaded
Open this post in threaded view
|

Re: macro passing BOOLEAN arguments problem

ctrueden
Hi Nicola,

>run("eSlideLStepCtr plugin", "movement=Exec waitanswer=true genericcmd=" + cmd);
>--------------------------
>
>probably is wrong "true" value (but i also try with "True" and "1")
>  
>

Try:

    run("eSlideLStepCtr plugin", "movement=Exec waitanswer genericcmd=" + cmd);


If you want waitanswer=false, use:

    run("eSlideLStepCtr plugin", "movement=Exec genericcmd=" + cmd);


-Curtis
Reply | Threaded
Open this post in threaded view
|

Re: macro passing BOOLEAN arguments problem

nicola76b@libero.it
In reply to this post by nicola76b@libero.it
great!!
now macro and plugin work correctly!!

thanks,

   Nicola