Bob, I’m going to define this global function in my Jmol Script:
function mfa(){x=[];n={*}.molecule.max;for (var i = 1;i <= n; i++){x.push({molecule=i}.find("MF"))};return @x} The function works and returns the array to JavaScript via Jmol.evaluateVar, but it works with and without the @. Is there any preference or any difference between these two expressions in this case? Only tangentially related to this subject, I have a used Jmol.getPropertyAsJavaObject in some of my JavaScript per your suggestions. While it’s very neat, it does bring some object vs array confusion into the JavaScript side. It’s not a big deal, but I just got hung up on .size vs .length. In the case at hand, I’m replacing a Jmol.getPropertyAsJavaObject approach to mf with Jmol.evaluateVar approach to mf. Otis -- Otis Rothenberger o...@chemagic.org http://chemagic.org ------------------------------------------------------------------------------ Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape _______________________________________________ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users