Problem with 6.3 - Application Example: Collaborative Example (in Developer's Guide)

  • To: <visad-list@xxxxxxxxxxxxx>
  • Subject: Problem with 6.3 - Application Example: Collaborative Example (in Developer's Guide)
  • From: "Vimal Gopal" <gopal@xxxxxxx>
  • Date: Fri, 7 Jul 2000 13:26:37 -0400
I copied the code in section 6.3 (Application Example: Collaborative
Example), and I am getting an unusual runtime error.  Here is the error:

Exception in thread "main" visad.TypeException: FunctionType: domain must be
RealTupleType or RealType
        at visad.FunctionType.<init>(
        at reader2.<init>(
        at reader2.main(

Here's the code as I wrote it:

public class reader2
    private RealType reala, realb, realc;  //note that these three variables
have been declared as 'ReaTypes'
    private DisplayImpl display1;
    private GraphicsModeControl mode;

    private DataReferenceImpl ref_real, ref_real_tuple, ref_field;

    public reader2() throws VisADException, RemoteException
        FunctionType field_type = new FunctionType(reala, realb);  //this is
line 26, and this is where it complains
        FlatField field = FlatField.makeField(field_type, 64, false);
        Real real = new Real(reala, 2.0);
        Real[] reals3 = {new Real(reala, 1.0), new Real(realb, 2.0), new
Real(realc, 1.0)};
        RealTuple real_tuple = new RealTuple(reals3);

        display1 = new DisplayImplJ3D("display1");

        display1.addMap(new ScalarMap(reala, Display.XAxis));
        display1.addMap(new ScalarMap(reala, Display.YAxis));
        display1.addMap(new ScalarMap(reala, Display.ZAxis));

        mode = display1.getGraphicsModeControl();

        ref_real = new DataReferenceImpl("ref_real");
        display1.addReferences(new DirectManipulationRendererJ3D(), new
DataReference[] {ref_real});

        ref_real_tuple = new DataReferenceImpl("ref_real_tuple");
        display1.addReferences(new DirectManipulationRendererJ3D(), new
DataReference[] {ref_real_tuple});

        ref_field = new DataReferenceImpl("ref_field");
        display1.addReferences(new DirectManipulationRendererJ3D(), new
DataReference[] {ref_field});

        JFrame jframe = new JFrame("Remote Display Example");
        jframe.setSize(640, 480);

    public static void main(String[] args) throws VisADException,
        new reader2();

What could be causing this problem?  The according what I've written, reala,
realb, and realc *are* RealTypes.