Re: getImage exception

Hi Paul,

Your Exception is indeed caused by calling getImage() from
an event handler.  I doubt that using the invokeLater()
method from SwingUtilities will work.  Your event handler
needs to construct a 'new Thread' for this, as in the
captureDialog() method of (at about
line 700).  Note this method calls BasicSSCell.captureImage()
which in turn calls DisplayImpl.getImage() and then uses
the image to build a JPEG file.  Your code would probably
do something different after the getImage() call.

I have asked Curtis to upload a new visad.jar longer than

Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738

On Tue, 10 Oct 2000, Paul Gifford wrote:

> Hello again,
>   Here's my latest exception:
> visad.VisADError: cannot call getImage() from Thread: AWT-EventQueue-0
>         at visad.DisplayImpl.getImage(
>   Any thoughts?  I don't get the exception when I run Test50, but I
> don't see what it is I'm doing differently.  A call to getImage() seems
> pretty straightforward!
> Thanks,
> p
> ------------------------
> Paul Gifford, Capt, USAF
> 325 S Broadway EGC2
> Boulder CO 80303
> 303-497-6556 voice
> 303-497-6513 fax