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

  • To: Vimal Gopal <gopal@xxxxxxx>
  • Subject: Re: Problem with 6.3 - Application Example: Collaborative Example (in Developer's Guide)
  • From: Bill Hibbard <hibbard@xxxxxxxxxxxxxxxxx>
  • Date: Fri, 07 Jul 2000 12:40:47 -0500
Hi Gopal,

> 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
> . . .
> What could be causing this problem?  The according what I've written, reala,
> realb, and realc *are* RealTypes.

Sorry that Section 6.3 isn't more clear.  reala is declared
as a RealType but not constructed as one in the code 'fragment'
in 6.3.  So reala is null in the FunctionType constructor and
that causes the Exception.

Please add:

    reala = new RealType("reala");
    realb = new RealType("realb");
    realc = new RealType("realc");

at the start of your reader2() method.

Also, your ScalarMaps are all for 'reala'.  Please change them to:

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

To experiment with this collaboration logic, you might
be better off starting with and
in the visad/examples directory.  Also, I think Dave
Glowacki will release his collaboration tutorial next
week that will include soem nice examples to start from.

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

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