Andrew R Turner wrote:

>Hi,
>
>Now that my teaching commitments are finished for the moment I have a  
>chance to get on with working on the dialogs in Jmol. I have had a  
>look around the code and I have a question: how do you execute a jmol  
>command using the GUI?
>
>I know how to create buttons and add action listeners etc. but I  
>cannot seem to see the method to call to actually execute a command. I  
>have tried the following (as a test) and it just gives errors:
>
>viewer.evalString("cpk 75%");
>
>(viewer is associated with the instance of the Viewer class.)
>
>Sorry if my question is obvious but I am still getting to grips with  
>the structure of the package!
>
>  
>
No, no. Don't be shy. It takes some getting used to.

Check org.openscience.jmol.DisplayPanel. In there you will see actions 
that call

      viewer.evalStringQuiet(action);

"Quiet" is what you want, because otherwise messages are sent to the 
command console.

Bob





>Best regards
>
>Andy
>
>==================================
>      Dr Andrew R. Turner
>      Research Computing Officer
>   e: [EMAIL PROTECTED]
>   t: +44 (0)131 650 7748
>   w: http://www.eastchem.ac.uk/rcf
>icq: 370-899-715
>   p: School of Chemistry
>      University of Edinburgh
>      EH9 3JJ
>==================================
>
>  
>


-- 
Robert M. Hanson
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



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to