From: Egon W. <eg...@sc...> - 2001-10-16 06:21:45
|
On Monday 15 October 2001 18:40, Christoph Steinbeck wrote: > Egon Willighagen wrote: > > For at least the sixth time (!!!!) i have to change the Atom code > > to correctly instantiate variables! This is getting rather annoying..= =2E > > (don't feel guilty... just want to make sure the message arrives ;) > > I'm not quite sure what you mean, but I understand you're angry :-) > Could you elaborate a little on the problem? The SAXException that was thrown by the CML import lib, was actually a NullPointerException which was encapsulated... The NullPointerException was thrown when a 3D coord was added to an Atom... It was thrown because point3d was not initialized... The constructor should have done it, *or* the set3Dx() procedure should check if the point3d var was initialized... (i think the former is the better choice...) The constructor looked like: public Atom(String elementSymbol) { super(elementSymbol); } It now initializes the vars: public Atom(String elementSymbol) { super(elementSymbol); this.point3D =3D new javax.vecmath.Point3d(); this.point2D =3D new javax.vecmath.Point2d(); } Egon |