El 4 Oct 2007 a las 17:25, sushil ronghe escribió:
> OOPs the code
> viewer.script("pmesh me \""+file.getAbsolutePath() + "\"");
> works fine on linux but it is giving the error on windows.
> file not found.
>
> suppose the file location is D:\myWork\files\MESHDATA.txt
> then the error message => file not found:D:myWorkfilesMESHDATA.txt
The commas business tends to be messy when a combination of
Javascript, JmolScript etc is used. But now it seems that in your
case the backslash is being taken as an escape character and so
ignored. I imagine two possible solutions:
1 (best): do not use backslash \ but forward slash /, it's more
cross-platform in HTML.
2: maybe, use double backslashes \\
It all depends on which scripting languages your code is going
through; I don't think I can be more specific.
It seems that your file.getAbsolutePath() comes straight from...
Java? Javascript? (I'm lost here) and Windows is messing it up. If
you cannot control its output, at least you should be able to parse
it through a function that replaces all "\" by "/", before giving it
to viewer.script
Good luck
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users