Angel, Some visual assurance that the user is not hung is a really good idea.
Combining Jmol script with JavaScript is something I often use. It’s just easier for me. I even define a few Jmol script globals on Jmol load so that I can fill them with JavaScript using Jmol.script(jmolApplet0, scpt) when needed - scpt is a string that’s concatenated to define the globals. This usually happens on some type of call back. On the callback, I’m in JavaScript, so it’s just easier for me to talk to the applet via JavaScript. Add to this the fact that the applet can talk back to Javascript with the javascript command. When it comes to applet/javascript communication, I’ll add one other thing that I’m using more frequently - cross page applet communication using HTML5 local storage. Within your domain almost any type of cross page and cross applet chatter is possible. On the Jmol ASYNC, I just tried a few variations with a large pdb file. The docs say that ASYNC will allow model interactivity during load. They do not specifically say scripting is possible. What I noticed is that interactivity was not even possible until the new load finished. Otis > On Jun 9, 2015, at 12:58 PM, Angel Herráez <angel.herr...@uah.es> wrote: > > Thanks Otis > > it's basically your #2 > > I was just playing once again with my old idea od giving the user a hint of > "please wait" and also "things are progressing". Today I had a file that > takes > time to load so the idea came back. > > My current, regular solution is a Jmol echo "loading..." but when things take > long one does not know if it is stalled. So, I tried a progressive change of > the > echo. It works fine using the timeout command, as long as I do not load a > model. > > >> I think the only way you´re going to be able to do this is asynchronously, > but load ASYNC appears to be broken on the version I´m using - 14.2.4 > about a year old. > > Mine is 14.3 How do you check if async is working? I had never used it > before. > > Then I went and tried a different thing: overlay JSmol with a "loading > notice" > in a DIV and then close it using loadStructureCallback. Works nicely but > it's > not pure JmolScript. It lets me put text + animated spinner, though, which I > like, and also check for success/failure in loading and act accordingly. > > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Jmol-users mailing list > Jmol-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jmol-users > > ------------------------------------------------------------------------------ _______________________________________________ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users