Thanks for the quick response. Turns out that even with the setAppletSync
call I can't get the *unsigned* jspecviewapplet.jar to show anything,
whereas the *signed* jspecviewappletsigned.jar is able to show my spectra.
Any idea what might be the cause of this and how to work around it?

Best,
Tim

On Fri, Oct 26, 2012 at 5:55 PM, Robert Hanson <[email protected]> wrote:

> just sent you a response to your bug report. It reads:
>
> This is not a bug. This is just not understanding how to synchronize the
> loading of the two applets. Since we don't know which applet will finish
> loading first, we have to issue a special command that waits for both to
> load before giving a script to either:
>
>
> // applet ids and commands to give only when all applets are ready;
> // also sets up a script sync pathway for Jmol/JSpecView.
> Jmol.setAppletSync([jsvApplet, jmolApplet], ["load acetophenone.jdx",
> null], true);
>
>
> Says "after these two applets are loaded, send jsvApplet its load command.
> The last parameter indicates that this is a Jmol/JSpecView connection,
> which is treated specially by Jmol.
>
>
>
> See http://chemapps.stolaf.edu/jmol/jspecview/jsvtest.htm
>
> Bob
>
> On Fri, Oct 26, 2012 at 10:39 AM, Tim te Beek <[email protected]> wrote:
>
>> Hi all,
>>
>> I'm trying to get JSpecView and Jmol to interact using the new
>> JavaScripts, I'm unable to get jspecView to show and load data.
>>
>> Here's a short summary of what I do:
>>
>> //The required imports:
>> <script type="text/javascript" src="jmol/jquery-1.8.2.min.js"></script>
>>  <script type="text/javascript" src="jmol/JmolCore.js"></script>
>> <script type="text/javascript" src="jmol/JmolApplet.js"></script>
>>  <script type="text/javascript" src="jmol/JmolControls.js"></script>
>> <script type="text/javascript" src="jmol/JmolApi.js"></script>
>>  <script type="text/javascript" src="jmol/JmolJSV.js"></script>
>>
>> //init Jmol
>> var jmolInfo = {width : 370, height : 370 };
>> var jmol = Jmol.getApplet('jmol', jmolInfo);
>> Jmol.script(jmol, 'load DATA \'inline\'\n ... snipped ... \nEND
>> \'inline\'');
>>
>> //init JspecView
>> var jspecInfo = {width : 370, height : 370, jarPath : 'jmol', jarFile :
>> 'JSpecViewApplet.jar', };
>> var jspec = Jmol.getJSVApplet('jspec', jspecInfo);
>> Jmol.jsvLoadInline(jspec, 'DATA \'inline\'\n ... snipped ... \nEND
>> \'inline\'');
>>
>> This last line fails because jspec._applet is null, meaning the call to
>> loadInLine in JmolJSV.js#219 fails with Error calling method on NPObject.
>>
>> Can anyone point me to the correct way to load both Jmol and JspecView
>> and have them interact?
>>
>> Best,
>> Tim
>>
>>
>>
>> ------------------------------------------------------------------------------
>> The Windows 8 Center
>> In partnership with Sourceforge
>> Your idea - your app - 30 days. Get started!
>> http://windows8center.sourceforge.net/
>> what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/
>> _______________________________________________
>> Jmol-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>
>>
>
>
> --
> Robert M. Hanson
> Larson-Anderson Professor of Chemistry
> Chair, Chemistry Department
> 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
>
>
>
>
> ------------------------------------------------------------------------------
> The Windows 8 Center
> In partnership with Sourceforge
> Your idea - your app - 30 days. Get started!
> http://windows8center.sourceforge.net/
> what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
------------------------------------------------------------------------------
WINDOWS 8 is here. 
Millions of people.  Your app in 30 days.
Visit The Windows 8 Center at Sourceforge for all your go to resources.
http://windows8center.sourceforge.net/
join-generation-app-and-make-money-coding-fast/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to