Re: visad.TypeException

Hi Nash'at,

First, to solve your problem, replace code:
  new RealType(...)   and   new TextType(...)
with:
  RealType.getRealType(...)   and   TextType.getTextType(...)

VisAD maintains a static list of ScalarTypes, so once you create
a ScalarType you cannot create one with the same name again, but
you can reuse the original one.

Secondly, I would recommend against using a Java3D display inside
a JInternalFrame.  You'll notice the heavyweight Java3D panel
will draw on top of parts of the JInternalFrame, and currently
there is no workaround to this problem.  It's probably easier to
just use separate JFrames.

-Curtis

At 17:05 11/6/00, you wrote:
>Hi,
>
>I am trying to write an application using visad which reads a datafile
>and displays it in a JInternalFrame. The first time display works fine
>but when I clear the internal frame and try to display a second time 
>I get the following exception:
>
>visad.TypeException: ScalarType: name already used
>
>Any help would be appreciated. The source files are attached.
>
>Thanks,
>
>Nash'at


  • 2000 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: