> At 7/23/05, Miguel wrote:
>>And I am assuming that you are developing/debugging your
>>scripts in the Jmol application ... as I always *strongly* recommend.
>
> Using the application is not very easy for me.
> My web pages use JavaScript to generate Jmol scripts.
> It is cumbersome to try to copy every script
> into the Jmol application, whereas execution
> in the Jmol applet is just a few mouse clicks.

OK

If the scripts are being generated by JavaScript then that makes sense.

If the scripts are simply inline in the HTML pages then you may want to
consider splitting them out and putting them in separate script files. In
some circumstances that may make the scripts easier to maintain ... and it
makes them easily accessible from the Jmol application.


For doing development using the Jmol Applet in a web browser I have the
following recommendations:

1. use Mozilla
2. open the Java Plug-in console
3. open the Jmol console
4. set debugScript on
5. Give me feedback


use Mozilla
===========
Mozilla is the best browser for web application development. Mozilla ...
not FireFox

Tools -> Web Development -> Java Console
Tools -> Web Development -> JavaScript Console

It is important to see the Java Console ... #2 below

Use the JavaScript console. Clean up the JavaScript warnings & error
messages that show up in the JavaScript Console.

Hit the clear button & reload the page until you don't get any
errors/warnings.

If your pages do not generate JavaScript errors in Mozilla then they will
work with FireFox & IE.

FireFox also has the JavaScript console. However, it does not have a way
to open the Java Console from the menus.


open the Java Plug-in console
=============================
It is *very* important that you open the Java Plug-in Console

A lot of things get reported there ... most importantly stack dump
information if/when Jmol chokes on something.

The method to use to open the Java Console depends upon your operating
system.

Windows
-------
Start -> Settings -> Control Panel -> Java Plug-in Control Panel -> Basic
-> Show Java Console -> Apply

Linux
-----
assuming Java 1.5 is installed on your path:
$ ControlPanel
  Advanced -> Settings -> Java Console -> Show Console

OSX
---
Applications -> Utilities -> Java -> Java Plug-in Settings ->
something-that-looks-like-ShowConsole


Use the Clear button each time before you load the page or go to a new page.

Leave it open ... do not close it. If it bothers you then minimize it.

If you close it then it will not come back until you restart the browser.

If you are using Mozilla (like you are supposed to) then you will not have
this problem ... you can reopen at any time:

  Mozilla: Tools -> Web Development -> Java Console


open the Jmol Console
=====================
You can open the Jmol Console in two ways

1. Jmol Popup -> Console ... -> Open

2. add the 'console' command to your scripts. I suspect that this could be
very useful during development and could save a lot of keystrokes.


set debugScript on
==================
You can issue the script command

  set debugScript on|off

This will show commands as they are executing.
The output format is not exactly the same as the script. For example, the
atom expressions are printed out in reverse polish notation.

At times it may be useful to embed 'set debugScript on' and 'set
debugScript off' in your scripts ... to prevent it from spewing out lots
of stuff.


Give me feedback
================
If you have specific recommendations on things I can do to facilitate the
debugging/development cycle please let me know.



Miguel

-----
Open Source Molecular Visualization
www.jmol.org
[EMAIL PROTECTED]
-----






-----
Open Source Molecular Visualization
www.jmol.org
[EMAIL PROTECTED]
-----



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to