Hi again - maybe I wasn't clear enouth in my last email. I am talking about a standalone Java application. It puts the Jmol applet in one of its own windows. There is no browser, thus no HTML and no JavaScript interpreter I could use. On the other hand, this solves your problem. I don't pass the applet parameters via HTML code. I implement my own AppletStub (which any applet uses to get parameters, the interface has a method called getParameter), and I have implemented a corresponding setParameter method in the same class. With these I pass my models through to Jmol, newlines and all.
Some selected lines of code involved in showing a result. Just in case you're interested. These lines also show my interest in retrieving some display settings (with the new Jmol, that would be the settings in the right-click menu) and handing it to another instance of the applet.
public void outputResult(CaGeResult result)
{
...
String encoding = cmlWriter.encodeResult(result);...
createFrame();
installApplet();
setParameter("MODEL", encoding);
setParameter("FORMAT", "CMLSTRING");
startApplet();
...
}...
void startApplet()
{
applet.setStub(this);
try {
applet.init();
} catch (Exception ex) {
resultPanel.showException(ex, "Jmol exception");
appletStarted = true;
return;
}
if (displaySettings != null) {
try {
applet.setDisplaySettings(displaySettings);
} catch (NoSuchMethodError er) {
}
}
applet.start();
appletStarted = true;
}
The start or init method of the applet will retrieve the parameters (via getParameter) that were set in the lines shown (using setParameter).
I hope you see that you can't assume people don't need or won't be able to use inline models. Especially with CML - this doesn't require newlines. But as my example should have shown, an applet can be used in more ways the developers might imagine anyway (and completely conformant to the specs), even enabling newlines in applet parameters.
Sebastian Lisken
------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Jmol-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jmol-users

