Thanks a lot!
2006/3/24, Wayne Rasband <
[hidden email]>:
>
> > I'm writing a plug-in and the way I use to close windows
> > I don't need anymore is:
> >
> > imp.getWindow().close(); where imp is an ImagePlus
> >
> > this happens to display a dialog asking if I want to save cahnges
> > in images. What do I have to do to avoid this dialog? I don't need
> > to save the changes.
>
> Use
>
> imp.changes = false;
> imp.getWindow().close();
>
> Note that this method generates an exception if your plugin as called
> from a macro running in batch mode. With ImageJ 1.36 and later, you can
> use
>
> imp.changes = false;
> imp.close();
>
> which does not have this problem.
>
> -wayne
>