Yoav wrote:
> Hi,
> I downloaded JMol v9, added a simple test file
[snip]
Yoav,
I suggest that you download the Jmol v10 beta test.
> It works just fine, loading the molecule. Then I change load to
> loadInline and past in the test.mol contents as the value of the
> loadInline parameter.
There are problems with loadInline that are caused by the fact that the
browser removes newline characters from strings that are passed to the
PARAM tag.
The result is that the entire string gets passed to an applet as a single
line without newline characters.
> The molecule does load and on the Java console I
> get:
>
> ReaderFactory: Format undetermined
>
> How come? What should I do?
Because of this "special" handling of PARAM strings, the JmolApplet
receives the entire molecular model as one line of text.
With Jmol *v9* only CML data can be passed in via loadInline ... because
CML is not dependent upon newline characters.
Jmol *v10* has special support to deal with this problem. We use the
vertical bar | character to denote where line breaks should be inserted.
If you are working in JavaScript, then the following should work:
var myModel = {some-molecular-model-from-someplace}
myModel.replace(/\r|\n|\r\n/g, "|");
Let me know if you have more issues or questions.
Miguel
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
Jmol-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-users