Hi Rolf, if I use jmolScriptWait there the page becomes frozen and I have to
exit the browser...
2011/9/21 Rolf Huehne <[email protected]>
> On 09/21/2011 05:18 PM, Daniel Carbajo wrote:
> > So it seems the code does not work UNTIL the labeling script has finished
> > executing, right? If I just click residue checkboxes, the first time I
> get
> > "ERROR", the second I get "", but from the third on, I start getting the
> > correct label "NAT - manual N_A_2 CAV:2"... but really I have no clue on
> how
> > to sort this out...
> >
> I think the problem is that you are using 'jmolScript' instead of
> 'jmolScripWait' before the alert:
>
> var i = x[2].indexOf("colorLabel");
> if (i==0){
> jmolScript('select 2:A.CA and 1.1; label interesting;
> catom={selected};');
> alert( jmolEvaluate('catom.label') );
>
> var t = '\n' + document.getElementById('msg').value;
> document.getElementById('msg').value = label + t;
> }
>
> Therefore 'catom' isn't defined yet when the 'jmolEvaluate' is called
> for the alert and the Java console shows this error:
>
> RPN stacks: null result
>
> ifStack =
> eval ERROR: unexpected end of script command
> ----
> e_x_p_r_e_s_s_i_o_n = catom . >> label <<
> Error evaluating: catom.label
> unexpected end of script command
> ----
> e_x_p_r_e_s_s_i_o_n = catom . >> label <<
>
> If you would use 'jmolScriptWait' it should work as expected.
>
> Regards,
> Rolf
>
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users