Re: Refreshing DisplayImplJ2D after loading a new file

>
> It gives a "visad.TypeException: ScalarType: name already used" stemming from
> ScalarType.java:186. Apparently it did not like the fact that I am trying to
> use the same row and column with the same names such as:
>      row = new RealType("X", SI.meter, null);    
>      column = new RealType("Y", SI.meter, null);
> I presume the name "X" is where it cracks.


Hi Tolga,

You need not have uniquely named RealTypes.  Try replacing your code above
with:
   row = RealType.getRealType("X", SI.meter, null);
   column = RealType.getRealType("Y", SI.meter, null);

If RealTypes named "X" and "Y" already exist, this will use those,
and if they do not exist already, it will create them.

-Curtis


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