Dear Wayne (I apologize in the case I should rather contact you in direct
for such a request) Would it please be possible to add the following method: Void enableYesNoCancel(java.lang.String yesLabel, java.lang.String noLabel) Make this a "Yes No Cancel" dialog with custom labels. as well within the macro functions? I thank you very much in advance if it is possible. My best regards, Philippe Philippe CARL Laboratoire de Bioimagerie et Pathologies UMR 7021 CNRS - Université de Strasbourg Faculté de Pharmacie 74 route du Rhin 67401 ILLKIRCH Tel : +33(0)3 68 85 41 84 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Philippe,
maybe I have misunderstood something, but in Java, this method is already present: https://github.com/imagej/imagej1/blob/master/ij/gui/GenericDialog.java#L818 A macro equivalent could be useful, I agree. Michael ________________________________________________________________ On 27/06/2018 10:58, Philippe CARL wrote: > Dear Wayne (I apologize in the case I should rather contact you in direct > for such a request) > > Would it please be possible to add the following method: > > Void enableYesNoCancel(java.lang.String yesLabel, java.lang.String noLabel) > > Make this a "Yes No Cancel" dialog with custom labels. > > as well within the macro functions? > > I thank you very much in advance if it is possible. > > My best regards, > > Philippe > > > > Philippe CARL -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Michael,
Yes yes, the Java method exists already (actually my description of the method was simply copied from the following link: https://imagej.nih.gov/ij/developer/api/ij/gui/GenericDialog.html Thus I just asked whether it would be possible to add a handle of this method within the package ij.macro.Functions.java file. Of course I can live without such an addition (and it is from very far not high priority) but it would be cool!!! Also as I have you on the line, do you know whether Wayne prefers a posting on the list for such a request or rather a private e-mailing? Have a nice sunny day!!! Philippe -----Message d'origine----- De : ImageJ Interest Group [mailto:[hidden email]] De la part de Michael Schmid Envoyé : mercredi 27 juin 2018 11:23 À : [hidden email] Objet : Re: Addition of the enableYesNoCancel method within the macro functions Hi Philippe, maybe I have misunderstood something, but in Java, this method is already present: https://github.com/imagej/imagej1/blob/master/ij/gui/GenericDialog.java#L818 A macro equivalent could be useful, I agree. Michael ________________________________________________________________ On 27/06/2018 10:58, Philippe CARL wrote: > Dear Wayne (I apologize in the case I should rather contact you in direct > for such a request) > > Would it please be possible to add the following method: > > Void enableYesNoCancel(java.lang.String yesLabel, java.lang.String noLabel) > > Make this a "Yes No Cancel" dialog with custom labels. > > as well within the macro functions? > > I thank you very much in advance if it is possible. > > My best regards, > > Philippe > > > > Philippe CARL -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by CARL Philippe (LBP)
> On Jun 27, 2018, at 4:58 AM, Philippe CARL <[hidden email]> wrote:
> > Dear Wayne (I apologize in the case I should rather contact you in direct > for such a request) > > Would it please be possible to add the following method: > > Void enableYesNoCancel(java.lang.String yesLabel, java.lang.String noLabel) > > Make this a "Yes No Cancel" dialog with custom labels. > > as well within the macro functions? You can use the getBoolean(message, yesLabel, noLabel) macro function. Here is an example: if (getBoolean("Save changes?", "Save", "Don't Save")) IJ. log("User clicked \"Save\""); else IJ. log("User clicked \"Don't Save\"”); The mailing list and the forum are both good places to request features and report bugs. -wayne -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Dear Wayne,
Thanks a lot for your answer and your "getBoolean" is indeed giving an answer for the small code I had! But this function can't be combined within Dialog commands. So in such a case you would recommend to directly move over to java coding? My best regards, Philippe -----Message d'origine----- De : ImageJ Interest Group [mailto:[hidden email]] De la part de Wayne Rasband Envoyé : jeudi 28 juin 2018 01:33 À : [hidden email] Objet : Re: Addition of the enableYesNoCancel method within the macro functions > On Jun 27, 2018, at 4:58 AM, Philippe CARL <[hidden email]> wrote: > > Dear Wayne (I apologize in the case I should rather contact you in direct > for such a request) > > Would it please be possible to add the following method: > > Void enableYesNoCancel(java.lang.String yesLabel, java.lang.String noLabel) > > Make this a "Yes No Cancel" dialog with custom labels. > > as well within the macro functions? You can use the getBoolean(message, yesLabel, noLabel) macro function. Here is an example: if (getBoolean("Save changes?", "Save", "Don't Save")) IJ. log("User clicked \"Save\""); else IJ. log("User clicked \"Don't Save\"”); The mailing list and the forum are both good places to request features and report bugs. -wayne -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |