Rene,

In your modified/improved GaussianReader you are calling
Float.parseFloat(String)

Unfortunately for everyone, this did not exist in Java 1.1.

Therefore, we cannot use this method or the applet will crash on
InternetExplorer and Netscape 4.*

This is not a big deal ... we just need to change to calling our own
parseFloat routine that is in ModelReader.java. Since we are a subclass we
can just call parseFloat directly. This has the additional convenience of
not throwing exceptions ... it just returns a NaN.

We can do the same for parseInt.

The change is below.

Miguel

  try {
    atom.vectorX = Float.parseFloat(tokens[offset++]);
    atom.vectorY = Float.parseFloat(tokens[offset++]);
    atom.vectorZ = Float.parseFloat(tokens[offset++]);
  }
  catch (NumberFormatException e)
    {
      System.out.println("NumberFormatException in " + line);
    }

becomes
  atom.vectorX = parseFloat(tokens[offset++]);
  atom.vectorY = parseFloat(tokens[offset++]);
  atom.vectorZ = parseFloat(tokens[offset++]);


-----
Open Source Molecular Visualization
www.jmol.org
[EMAIL PROTECTED]
-----



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Jmol-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to