Bob,
The writing and loading file features that you just introduced in JSmol are
truly innovative and take JSmol to a new level. Excellent job.
However, I do have one aesthetic suggestion:
When loading files into JSmol from a local machine, a new panel with
BROWSE/LOAD/CANCEL buttons appears on the page and a prompt window only
appears after clicking on the BROWSE button. Is it possible to go straight
to the prompt window (as happens with Jmol when loading a file) to select a
file of your choice in lieu of having to go through the BROWSE button? Just
some thoughts.
Thanks!
Amjad
On Tue, Sep 17, 2013 at 5:54 PM, Robert Hanson <[email protected]> wrote:
> Used to be that it required the signed applet to read and write files
> locally. Well, well, what do you know? I'm liking HTML5 more and more. The
> following commands, previously for the signed applet only, now work in
> JSmol/HTML5.
>
> load ? x = load("?")
>
> write file ?
>
> write xxx.jpg write xxx.png write PNGJ xxx.png
> write PNGJ 500 500 "xxx.png"
> write xxx.zip write xxx.jmol
>
> write xxx.pdb write xxx.mol write xxx.v2000
> write xxx.v3000 write xxx.xyz
>
>
> What's especially satisfying for me is that the loading is done
> asynchronously. I had thought that would be extremely difficult to do -- to
> pause a running script of however many levels of depth and deep into
> however many function calls while an asynchronous file load was happening,
> then restart upon completion at the right place. Well, guess what? It was
> only moderately difficult! The HTML5 FileReader API is great. [
> http://www.w3.org/TR/FileAPI/ ] Looks like this has reasonable support
> across browsers (http://caniuse.com/#feat=filereader), although one
> cannot go back very far in time.
>
> Writing files to disk still requires "reflecting" the data from
> Info.serverUrl, but I'm optimistic (based on http://caniuse.com/filesystem)
> that the HTML5 FileWriter API will continue to be introduced and at some
> point will allow us to get rid of the need of a server for local file
> writing. Certainly what we have now is close to ideal.
>
> Check it out at http://chemapps.stolaf.edu/jmol/jsmol/jsmol.htm
>
> http://chemapps.stolaf.edu/jmol/zip/jmol-13.3.6_2013.09.17.zip
>
> Bob
>
>
> --
> Robert M. Hanson
> Larson-Anderson Professor of Chemistry
> St. Olaf College
> Northfield, MN
> http://www.stolaf.edu/people/hansonr
>
>
> If nature does not answer first what we want,
> it is better to take what answer we get.
>
> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
>
>
>
> ------------------------------------------------------------------------------
> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8,
> SharePoint
> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
> includes
> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users