Hi  Miguel,

Yikes.

I did a little bit of Java applet stuff back in the mid 90s and only recently started looking at Java again. I was not aware that those wrapper object were not available in earlier versions of Java. Since I am writing on a Mac OS X system using Safari as the browser, I don't think would have even noticed the problem if I had tried out the applet.

Good thing you are checking up on me :-).

Ren�

On Oct 17, 2004, at 11:04 PM, Miguel wrote:

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





------------------------------------------------------- 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