Re: Use of showImageWithCancel("message") ?

Posted by Alan Hewat on
URL: http://imagej.273.s1.nabble.com/Use-of-showImageWithCancel-message-tp3689513p3689516.html

Thanks Michael, but I understand the "title" string is optional in
both showMessageWithCancel(); and showMessage(); and I checked that
including the title makes no difference.

Am I missing something fundamental here in that I should include some
IJ extension package perhaps ?

Alan.

On 3 February 2010 18:37, Michael Schmid <[hidden email]> wrote:

> 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
______________________________________________