Posted by
Michael Schmid on
Feb 03, 2010; 5:37pm
URL: http://imagej.273.s1.nabble.com/Use-of-showImageWithCancel-message-tp3689513p3689515.html
Hi Alan,
at least in the current version of ImageJ, IJ.showMessageWithCancel
should have two arguments:
public static boolean showMessageWithCancel(String title, String msg)
Michael
________________________________________________________________
On 3 Feb 2010, at 18:21, Alan Hewat wrote:
> According to the IJ doc
>
http://rsbweb.nih.gov/ij/developer/api/ij/IJ.html> showImageWithCancel("message") should return "false" if CANCEL is
> clicked and otherwise "true".
>
> But in ImageJ 1.43o I get the error "number or numeric function
> expected" for:
>
> if(!showMessageWithCancel("Is this OK?")) showMessage("You clicked
> CANCEL");
>
> I want to branch to alternative actions according to "OK" or "CANCEL".
> So far as I can see showMessageWithCancel() acts just like
> showMessage() except that it has a CANCEL button that simply exits the
> routine :-(
>
> Alan
> ______________________________________________
> Dr Alan Hewat, NeutronOptics, Grenoble, FRANCE
> <
[hidden email]> +33.476.98.41.68
>
http://www.NeutronOptics.com/hewat> ______________________________________________