oooh, please don't do that!  All JavaScript calling should be taken care 
of in Jmol.java, within the MyStatusListener interface. I recently made 
jsoWindow a local there because it is unreliable as a long-term 
variable. (The page may close.)

If you want to call a JS function, can you use the JavaScript command?

I think one of the problems here might be that you are using 11.4 
instead of 11.5 for your development base. That's asking for trouble, as 
11.5 has changes in this regard.


»»»JIJI«««.::::: wrote:

> Dear All,
>
>
> I want to call a javascript function in StatusManager.java program,
>
> for that i had wrote the following code:
>
>  try{
>           JSObject jsoWindow=Jmol.jsoWindow;
>           String[] args = {"Jiji"};
>           jsoWindow.call("jsfnctn", args);    // 'jsfnctn' is  the 
> java script function
>       }
>  catch (Exception e){
>           System.out.println(e);
>       }
>
>
> by executing this the following error occurs:
>
> java.lang.NullPointerException
>
>
my guess is that Jmol.jsoWindow is null. This variable does not exist in 
11.5.

>------------------------------------------------------------------------
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by: Microsoft
>Defy all challenges. Microsoft(R) Visual Studio 2008.
>http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Jmol-developers mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/jmol-developers
>  
>


-- 
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: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to