[Jmol-users] State and Inline Load

2010-09-27 Thread Otis Rothenberger
Bob, I'm having problems with save/restore state with models that originated with a load inline. The state script needs the original load string. I've been operating on the assumption that if my original onload script for the applet contains a var mod1 = "", then mod1 is global. If I do a lo

Re: [Jmol-users] State and Inline Load

2010-09-27 Thread Robert Hanson
var xxx = is local to whatever script contains it. xxx = is global. On Mon, Sep 27, 2010 at 9:56 AM, Otis Rothenberger wrote: > Bob, > > I'm having problems with save/restore state with models that originated > with a load inline. The state script needs the original load string. > >

Re: [Jmol-users] State and Inline Load

2010-09-27 Thread Robert Hanson
Fixed. When you do this: x = getProperty("extractModel", "all") load append '@x' reset x write state Jmol is SUPPOSED to put this in the state: { var x = "string\nJmol version 12.1.14_dev 2010-09-17 15:12\nEXTRACT: ({0:4})\n 5 4 0 0 0\n 0.0 0.0 0.0 C \n 0.6404

Re: [Jmol-users] State and Inline Load

2010-09-27 Thread Otis Rothenberger
Bob, I may have complicated the issue with the example of duplicating a model. The problem seems to exist in any single model (no append) using load from string. Appended to this email is the state code for a model of acetic acid loaded with a string using data returned from NIH Resolver. I

Re: [Jmol-users] State and Inline Load

2010-09-27 Thread Robert Hanson
Right. I fixed that, too, I think. No? This: { var mod1 = "C2H4O2 ..."; load } "@mod1"; should be this: { var mod1 = "C2H4O2\nAPtclcactv09271012363D 0 " load "@mod1"; } Try the latest* *I uploaded. Bob On Mon, Sep 27, 2010 at 11:56 AM, Otis Rothenberger wrot

Re: [Jmol-users] State and Inline Load

2010-09-27 Thread Otis Rothenberger
Bob, You are correct. All is good. I have a code mess that I need to clean up and then I'm going to upload the toy and do some playing with my partner in this project. Thanks. Otis Otis Rothenberger chemagic.com On 9/27/2010 1:35 PM, Robert Hanson wrote: > Right. I fixed that, too, I thin