Re: [Jmol-developers] Still trying to trace why a state script doesn't quite get the orientation right...

2011-02-04 Thread Jonathan Gutow
OK, that makes sense and is easy to do.  I'm already using callbacks  
to make sure Jmol is properly loaded before I do other things.   
Thanks!  Maybe I will have time this weekend.  I'll let  you know.

Jonathan
On Feb 3, 2011, at 9:41 PM, Robert Hanson wrote:

 Ah, hah! Well, that's it then. When you pass a script in the applet  
 tag, it becomes a parameter of the object/applet tag. Those  
 parameters do not preserve line endings -- just like HTML. This was  
 the original reason that Miguel thought it would be difficult to  
 build a model from a scripted model file when I asked him about that  
 in my first question to him. Wow, my first interaction with Jmol!

 So the proper way to do this is to make the script a callback that  
 will notify the page that the applet is now ready for loading, and  
 then to send that script using jmolScript().

 Voila!

 Bob

 On Thu, Feb 3, 2011 at 7:38 PM, Jonathan Gutow gu...@uwosh.edu  
 wrote:

 On Feb 3, 2011, at 2:52 PM, Robert Hanson wrote:


 On Wed, Feb 2, 2011 at 12:56 PM, Jonathan Gutow gu...@uwosh.edu  
 wrote:

 Cool.  What conference exactly?

 http://www.icsti.org/spip.php?rubrique49

 
  I did slip that semicolon in somewhere along the way there. So if
  this is your problem, maybe somehow your JavaScript is stripping  
 all
  the newline characters. Not a good idea. Are you perhaps splitting
  on \n and forgetting to put that back in? Something's amiss
  there I don't think it's a problem inside Jmol.
 That's an idea.  I don't remember doing that, but I only recently  
 came
 back to this code after about 4 months off...I'll check.  It makes
 some sense because what we actually want to do is store the script as
 a hidden div in the page, which can get saved on the server and thus
 restore user changes across openings of the page.  This  means that I
 did have some massaging to make it work OK in a div.  I think I
 replaced all the \n with br/.  The idea being that they would then
 be replaced with \n before passing back to the applet.  I'm pretty
 sure I didn't strip the \n from the backup string version, but I will
 check.

 That'll do it. I'm sure that's it. The save orientation command  
 does not check to see how many parameters there are, so that next  
 moveto was simply being included on the line of the previous save  
 command. I think if you had used
 That doesn't appear to be it.  I can see all the \n in the string  
 using firebug.  I'll keep poking around, but putting the semicolon  
 back in fixed the problem.  I haven't got time right now, but remind  
 me where the script is broken into pieces (Tokens?) and I will try  
 to give it a gander.  Maybe another pair of eyes will find what is  
 going on.

 One clue is that the faulty script string worked fine if I pasted it  
 into the script console of the applet.  The problem only occurred  
 when the string was passed as the script in a call to  
 jmolApplet([width,height], scriptStr, AppletID).

  Dr. Jonathan H. Gutow
 Chemistry Departmentgu...@uwosh.edu
 UW-Oshkosh  Office:  
 920-424-1326
 800 Algoma BoulevardFAX:920-424-2042
 Oshkosh, WI 54901
 http://www.uwosh.edu/facstaff/gutow


 --
 The modern datacenter depends on network connectivity to access  
 resources
 and provide services. The best practices for maximizing a physical  
 server's
 connectivity to a physical network are well understood - see how these
 rules translate into the virtual world?
 http://p.sf.net/sfu/oracle-sfdevnlfb
 ___
 Jmol-developers mailing list
 Jmol-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jmol-developers




 -- 
 Robert M. Hanson
 Professor of Chemistry
 St. Olaf College
 1520 St. Olaf Ave.
 Northfield, MN 55057
 http://www.stolaf.edu/people/hansonr
 phone: 507-786-3107


 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 modern datacenter depends on network connectivity to access  
 resources
 and provide services. The best practices for maximizing a physical  
 server's
 connectivity to a physical network are well understood - see how these
 rules translate into the virtual world?
 http://p.sf.net/sfu/oracle-sfdevnlfb
 ___
 Jmol-developers mailing list
 Jmol-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jmol-developers

  Dr. Jonathan H. Gutow
Chemistry Department gu...@uwosh.edu
UW-Oshkosh   Office:920-424-1326
800 Algoma Boulevard   

Re: [Jmol-developers] Still trying to trace why a state script doesn't quite get the orientation right...

2011-02-04 Thread Angel Herráez
I'm rather surprised about the last posts in this thread. Up to now, 
I had the knowledge that the safest way to avoid timing problems 
was to put the script in the jmolAplet call and not in a jmolScript. 
Now it seems there are situations where the other is better (plus the 
callback, of course).

Jonathan, just a note. I cannot give details now (this is sort of an 
accumulated perception), but my troubles with line endings have 
always been less if using a textarea to hold the data. So maybe your 
hidden DIV could instead be a hidden TEXTAREA and you need less 
massaging and have less trouble.
I think that the browsers handle better the newlines in textareas.
At least this is what I reached when experimenting with passing model 
data between the 2D drawing applet (JChemPaint or others) and the 3D 
viewing applet (Jmol).



--
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb
___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] Still trying to trace why a state script doesn't quite get the orientation right...

2011-02-04 Thread Jonathan Gutow

On Feb 4, 2011, at 9:01 AM, Angel Herráez wrote:

 I'm rather surprised about the last posts in this thread. Up to now,
 I had the knowledge that the safest way to avoid timing problems
 was to put the script in the jmolAplet call and not in a jmolScript.
 Now it seems there are situations where the other is better (plus the
 callback, of course).
I think it depends what you are doing.  If  you can be sure that your  
script contains semi-colons at the end of every line the JmolApplet  
call should work fine.  That's the other safety feature I am  
considering rather than the callback + JmolScript.  I can strip all \n  
and add a semi-colon in their place if they do not exist.

 Jonathan, just a note. I cannot give details now (this is sort of an
 accumulated perception), but my troubles with line endings have
 always been less if using a textarea to hold the data. So maybe your
 hidden DIV could instead be a hidden TEXTAREA and you need less
 massaging and have less trouble.
 I think that the browsers handle better the newlines in textareas.
 At least this is what I reached when experimenting with passing model
 data between the 2D drawing applet (JChemPaint or others) and the 3D
 viewing applet (Jmol).
Thanks for the idea.  I'll give it a try.

  Dr. Jonathan H. Gutow
Chemistry Department gu...@uwosh.edu
UW-Oshkosh   Office:920-424-1326
800 Algoma Boulevard FAX:920-424-2042
Oshkosh, WI 54901
  http://www.uwosh.edu/facstaff/gutow






--
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb
___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] Still trying to trace why a state script doesn't quite get the orientation right...

2011-02-04 Thread Robert Hanson
You have to make sure you use ; if the script is to be part of the applet
tag. Simple  \n line terminations will not work,and you cannot just load a
model using the DATA command this way.


textareas are WAY BAD ideas, because different browsers (historically at
least) treat the line endings different ways.

You should always use jmolScript() to send models and scripts to Jmol. Never
use contents of divs or textareas directly.

Bob



2011/2/4 Angel Herráez angel.herr...@uah.es

 I'm rather surprised about the last posts in this thread. Up to now,
 I had the knowledge that the safest way to avoid timing problems
 was to put the script in the jmolApplet call and not in a jmolScript.
 Now it seems there are situations where the other is better (plus the
 callback, of course).

 Jonathan, just a note. I cannot give details now (this is sort of an
 accumulated perception), but my troubles with line endings have
 always been less if using a textarea to hold the data. So maybe your
 hidden DIV could instead be a hidden TEXTAREA and you need less
 massaging and have less trouble.
 I think that the browsers handle better the newlines in textareas.
 At least this is what I reached when experimenting with passing model
 data between the 2D drawing applet (JChemPaint or others) and the 3D
 viewing applet (Jmol).




 --
 The modern datacenter depends on network connectivity to access resources
 and provide services. The best practices for maximizing a physical server's
 connectivity to a physical network are well understood - see how these
 rules translate into the virtual world?
 http://p.sf.net/sfu/oracle-sfdevnlfb
 ___
 Jmol-developers mailing list
 Jmol-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jmol-developers




-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107


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 modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] Still trying to trace why a state script doesn't quite get the orientation right...

2011-02-03 Thread Robert Hanson
On Wed, Feb 2, 2011 at 12:56 PM, Jonathan Gutow gu...@uwosh.edu wrote:


 Cool.  What conference exactly?


http://www.icsti.org/spip.php?rubrique49


 
  I did slip that semicolon in somewhere along the way there. So if
  this is your problem, maybe somehow your JavaScript is stripping all
  the newline characters. Not a good idea. Are you perhaps splitting
  on \n and forgetting to put that back in? Something's amiss
  there I don't think it's a problem inside Jmol.
 That's an idea.  I don't remember doing that, but I only recently came
 back to this code after about 4 months off...I'll check.  It makes
 some sense because what we actually want to do is store the script as
 a hidden div in the page, which can get saved on the server and thus
 restore user changes across openings of the page.  This  means that I
 did have some massaging to make it work OK in a div.  I think I
 replaced all the \n with br/.  The idea being that they would then
 be replaced with \n before passing back to the applet.  I'm pretty
 sure I didn't strip the \n from the backup string version, but I will
 check.


That'll do it. I'm sure that's it. The save orientation command does not
check to see how many parameters there are, so that next moveto was simply
being included on the line of the previous save command. I think if you had
used

set debug
set debugscript

you would have found that.

Bob


Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107


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 modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] Still trying to trace why a state script doesn't quite get the orientation right...

2011-02-03 Thread Robert Hanson
Ah, hah! Well, that's it then. When you pass a script in the applet tag, it
becomes a parameter of the object/applet tag. Those parameters do not
preserve line endings -- just like HTML. This was the original reason that
Miguel thought it would be difficult to build a model from a scripted model
file when I asked him about that in my first question to him. Wow, my first
interaction with Jmol!

So the proper way to do this is to make the script a callback that will
notify the page that the applet is now ready for loading, and then to send
that script using jmolScript().

Voila!

Bob

On Thu, Feb 3, 2011 at 7:38 PM, Jonathan Gutow gu...@uwosh.edu wrote:


 On Feb 3, 2011, at 2:52 PM, Robert Hanson wrote:


 On Wed, Feb 2, 2011 at 12:56 PM, Jonathan Gutow gu...@uwosh.edu wrote:


 Cool.  What conference exactly?


 http://www.icsti.org/spip.php?rubrique49


 
  I did slip that semicolon in somewhere along the way there. So if
  this is your problem, maybe somehow your JavaScript is stripping all
  the newline characters. Not a good idea. Are you perhaps splitting
  on \n and forgetting to put that back in? Something's amiss
  there I don't think it's a problem inside Jmol.
 That's an idea.  I don't remember doing that, but I only recently came
 back to this code after about 4 months off...I'll check.  It makes
 some sense because what we actually want to do is store the script as
 a hidden div in the page, which can get saved on the server and thus
 restore user changes across openings of the page.  This  means that I
 did have some massaging to make it work OK in a div.  I think I
 replaced all the \n with br/.  The idea being that they would then
 be replaced with \n before passing back to the applet.  I'm pretty
 sure I didn't strip the \n from the backup string version, but I will
 check.


 That'll do it. I'm sure that's it. The save orientation command does not
 check to see how many parameters there are, so that next moveto was simply
 being included on the line of the previous save command. I think if you had
 used

 That doesn't appear to be it.  I can see all the \n in the string using
 firebug.  I'll keep poking around, but putting the semicolon back in fixed
 the problem.  I haven't got time right now, but remind me where the script
 is broken into pieces (Tokens?) and I will try to give it a gander.  Maybe
 another pair of eyes will find what is going on.

 One clue is that the faulty script string worked fine if I pasted it into
 the script console of the applet.  The problem only occurred when the string
 was passed as the script in a call to jmolApplet([width,height], scriptStr,
 AppletID).

  Dr. Jonathan H. Gutow
 Chemistry Departmentgu...@uwosh.edu
 UW-Oshkosh  Office: 920-424-1326
 800 Algoma BoulevardFAX:920-424-2042
 Oshkosh, WI 54901
 http://www.uwosh.edu/facstaff/gutow



 --
 The modern datacenter depends on network connectivity to access resources
 and provide services. The best practices for maximizing a physical server's
 connectivity to a physical network are well understood - see how these
 rules translate into the virtual world?
 http://p.sf.net/sfu/oracle-sfdevnlfb
 ___
 Jmol-developers mailing list
 Jmol-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jmol-developers




-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107


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 modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] Still trying to trace why a state script doesn't quite get the orientation right...

2011-02-02 Thread Jonathan Gutow
Bob,

Now that SourceForge is semi-functional again and we have a snow day  
here in Oshkosh, I got an updated copy of Jmol.
Jmol 12.0.30 seems to work fine.  Did you change anything in the  
script engine between 12.0.28 and 12.0.30?  I didn't see a note about  
fixing the misplaced semicolon, although I see it is correct now.

Jonathan
On Jan 30, 2011, at 7:20 PM, Robert Hanson wrote:

 Jonathan, can you send me one of those zip files?

 On Sat, Jan 29, 2011 at 8:39 PM, Jonathan Gutow gu...@uwosh.edu  
 wrote:
 I'm looking for suggestions of things to look for.  Within the SAGE  
 math package I use a state script generated by the applet that I  
 have saved as a string to recreate the view the user had in a  
 previous applet in a new one.  The problem is that everything but  
 the final moveto of the _set PerspectiveState() call is being  
 executed properly when I pass this string to the applet.  If I copy  
 the string into the console of an active applet everything works  
 exactly as expected.  Passing the string as the script when the  
 applet is initialized doesn't work.  Any ideas what I should look  
 for?  I'm using 12.0.28 and this worked with all the 11.X versions.   
 I haven't tried backtracking the 12.X versions.  Do I need to do  
 this?  I don't think the misplaced semi-colons Bob and I discussed  
 earlier are the problem.

 Jonathan
 Dr. Jonathan H. Gutow
 Chemistry Departmentgu...@uwosh.edu
 UW-Oshkosh  Office:  
 920-424-1326
 800 Algoma BoulevardFAX:920-424-2042
 Oshkosh, WI 54901
http://www.uwosh.edu/facstaff/gutow


 --
 Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
 Finally, a world-class log management solution at an even better  
 price-free!
 Download using promo code Free_Logger_4_Dev2Dev. Offer expires
 February 28th, so secure your free ArcSight Logger TODAY!
 http://p.sf.net/sfu/arcsight-sfd2d
 ___
 Jmol-developers mailing list
 Jmol-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jmol-developers



 -- 
 Robert M. Hanson
 Professor of Chemistry
 St. Olaf College
 1520 St. Olaf Ave.
 Northfield, MN 55057
 http://www.stolaf.edu/people/hansonr
 phone: 507-786-3107


 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
 --
 Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
 Finally, a world-class log management solution at an even better  
 price-free!
 Download using promo code Free_Logger_4_Dev2Dev. Offer expires
 February 28th, so secure your free ArcSight Logger TODAY!
 http://p.sf.net/sfu/arcsight-sfd2d
 ___
 Jmol-developers mailing list
 Jmol-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jmol-developers

  Dr. Jonathan H. Gutow
Chemistry Department gu...@uwosh.edu
UW-Oshkosh   Office:920-424-1326
800 Algoma Boulevard FAX:920-424-2042
Oshkosh, WI 54901
  http://www.uwosh.edu/facstaff/gutow






--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


Re: [Jmol-developers] Still trying to trace why a state script doesn't quite get the orientation right...

2011-02-02 Thread Robert Hanson
Jonathan,

'bout time you guys got some serious snow. We missed it here. Break between
January interim and Spring semester. Hey, Monday I get to go out to
Microsoft Research and give a talk about Jmol. Fun, eh? (Not to Microsoft --
they're just providing the space for a conference on publishing.)

I did slip that semicolon in somewhere along the way there. So if this is
your problem, maybe somehow your JavaScript is stripping all the newline
characters. Not a good idea. Are you perhaps splitting on \n and forgetting
to put that back in? Something's amiss there I don't think it's a
problem inside Jmol.

Bob


On Wed, Feb 2, 2011 at 11:43 AM, Jonathan Gutow gu...@uwosh.edu wrote:

 Bob,

 Now that SourceForge is semi-functional again and we have a snow day
 here in Oshkosh, I got an updated copy of Jmol.
 Jmol 12.0.30 seems to work fine.  Did you change anything in the
 script engine between 12.0.28 and 12.0.30?  I didn't see a note about
 fixing the misplaced semicolon, although I see it is correct now.

 Jonathan
 On Jan 30, 2011, at 7:20 PM, Robert Hanson wrote:

  Jonathan, can you send me one of those zip files?
 
  On Sat, Jan 29, 2011 at 8:39 PM, Jonathan Gutow gu...@uwosh.edu
  wrote:
  I'm looking for suggestions of things to look for.  Within the SAGE
  math package I use a state script generated by the applet that I
  have saved as a string to recreate the view the user had in a
  previous applet in a new one.  The problem is that everything but
  the final moveto of the _set PerspectiveState() call is being
  executed properly when I pass this string to the applet.  If I copy
  the string into the console of an active applet everything works
  exactly as expected.  Passing the string as the script when the
  applet is initialized doesn't work.  Any ideas what I should look
  for?  I'm using 12.0.28 and this worked with all the 11.X versions.
  I haven't tried backtracking the 12.X versions.  Do I need to do
  this?  I don't think the misplaced semi-colons Bob and I discussed
  earlier are the problem.
 
  Jonathan
  Dr. Jonathan H. Gutow
  Chemistry Departmentgu...@uwosh.edu
  UW-Oshkosh  Office:
  920-424-1326
  800 Algoma BoulevardFAX:920-424-2042
  Oshkosh, WI 54901
 http://www.uwosh.edu/facstaff/gutow
 
 
 
 --
  Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
  Finally, a world-class log management solution at an even better
  price-free!
  Download using promo code Free_Logger_4_Dev2Dev. Offer expires
  February 28th, so secure your free ArcSight Logger TODAY!
  http://p.sf.net/sfu/arcsight-sfd2d
  ___
  Jmol-developers mailing list
  Jmol-developers@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/jmol-developers
 
 
 
  --
  Robert M. Hanson
  Professor of Chemistry
  St. Olaf College
  1520 St. Olaf Ave.
  Northfield, MN 55057
  http://www.stolaf.edu/people/hansonr
  phone: 507-786-3107
 
 
  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
 
 --
  Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
  Finally, a world-class log management solution at an even better
  price-free!
  Download using promo code Free_Logger_4_Dev2Dev. Offer expires
  February 28th, so secure your free ArcSight Logger TODAY!
  http://p.sf.net/sfu/arcsight-sfd2d
  ___
  Jmol-developers mailing list
  Jmol-developers@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/jmol-developers

  Dr. Jonathan H. Gutow
 Chemistry Department gu...@uwosh.edu
 UW-Oshkosh   Office:920-424-1326
 800 Algoma Boulevard FAX:920-424-2042
 Oshkosh, WI 54901
  http://www.uwosh.edu/facstaff/gutow







 --
 Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
 Finally, a world-class log management solution at an even better
 price-free!
 Download using promo code Free_Logger_4_Dev2Dev. Offer expires
 February 28th, so secure your free ArcSight Logger TODAY!
 http://p.sf.net/sfu/arcsight-sfd2d
 ___
 Jmol-developers mailing list
 Jmol-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jmol-developers




-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107


If nature does 

Re: [Jmol-developers] Still trying to trace why a state script doesn't quite get the orientation right...

2011-02-02 Thread Jonathan Gutow

On Feb 2, 2011, at 11:57 AM, Robert Hanson wrote:

 Jonathan,

 'bout time you guys got some serious snow.
Actually, we probably overreacted.  Most of the snow went south.   
Milwaukee, Madison and places between here and there are apparently  
buried.  We've just got a lot of blowing snow.  That said, it looks  
great.

 We missed it here. Break between January interim and Spring  
 semester. Hey, Monday I get to go out to Microsoft Research and give  
 a talk about Jmol. Fun, eh? (Not to Microsoft -- they're just  
 providing the space for a conference on publishing.)
Cool.  What conference exactly?

 I did slip that semicolon in somewhere along the way there. So if  
 this is your problem, maybe somehow your JavaScript is stripping all  
 the newline characters. Not a good idea. Are you perhaps splitting  
 on \n and forgetting to put that back in? Something's amiss  
 there I don't think it's a problem inside Jmol.
That's an idea.  I don't remember doing that, but I only recently came  
back to this code after about 4 months off...I'll check.  It makes  
some sense because what we actually want to do is store the script as  
a hidden div in the page, which can get saved on the server and thus  
restore user changes across openings of the page.  This  means that I  
did have some massaging to make it work OK in a div.  I think I  
replaced all the \n with br/.  The idea being that they would then  
be replaced with \n before passing back to the applet.  I'm pretty  
sure I didn't strip the \n from the backup string version, but I will  
check.

Jonathan

 Bob


 On Wed, Feb 2, 2011 at 11:43 AM, Jonathan Gutow gu...@uwosh.edu  
 wrote:
 Bob,

 Now that SourceForge is semi-functional again and we have a snow day
 here in Oshkosh, I got an updated copy of Jmol.
 Jmol 12.0.30 seems to work fine.  Did you change anything in the
 script engine between 12.0.28 and 12.0.30?  I didn't see a note about
 fixing the misplaced semicolon, although I see it is correct now.

 Jonathan
 On Jan 30, 2011, at 7:20 PM, Robert Hanson wrote:

  Jonathan, can you send me one of those zip files?
 
  On Sat, Jan 29, 2011 at 8:39 PM, Jonathan Gutow gu...@uwosh.edu
  wrote:
  I'm looking for suggestions of things to look for.  Within the SAGE
  math package I use a state script generated by the applet that I
  have saved as a string to recreate the view the user had in a
  previous applet in a new one.  The problem is that everything but
  the final moveto of the _set PerspectiveState() call is being
  executed properly when I pass this string to the applet.  If I copy
  the string into the console of an active applet everything works
  exactly as expected.  Passing the string as the script when the
  applet is initialized doesn't work.  Any ideas what I should look
  for?  I'm using 12.0.28 and this worked with all the 11.X versions.
  I haven't tried backtracking the 12.X versions.  Do I need to do
  this?  I don't think the misplaced semi-colons Bob and I discussed
  earlier are the problem.
 
  Jonathan
  Dr. Jonathan H. Gutow
  Chemistry Departmentgu...@uwosh.edu
  UW-Oshkosh  Office:
  920-424-1326
  800 Algoma BoulevardFAX:920-424-2042
  Oshkosh, WI 54901
 http://www.uwosh.edu/facstaff/gutow
 
 
   
 --
  Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
  Finally, a world-class log management solution at an even better
  price-free!
  Download using promo code Free_Logger_4_Dev2Dev. Offer expires
  February 28th, so secure your free ArcSight Logger TODAY!
  http://p.sf.net/sfu/arcsight-sfd2d
  ___
  Jmol-developers mailing list
  Jmol-developers@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/jmol-developers
 
 
 
  --
  Robert M. Hanson
  Professor of Chemistry
  St. Olaf College
  1520 St. Olaf Ave.
  Northfield, MN 55057
  http://www.stolaf.edu/people/hansonr
  phone: 507-786-3107
 
 
  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
   
 --
  Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
  Finally, a world-class log management solution at an even better
  price-free!
  Download using promo code Free_Logger_4_Dev2Dev. Offer expires
  February 28th, so secure your free ArcSight Logger TODAY!
  http://p.sf.net/sfu/arcsight-sfd2d
  ___
  Jmol-developers mailing list
  Jmol-developers@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/jmol-developers

  Dr. Jonathan H. Gutow
 Chemistry Department 

Re: [Jmol-developers] Still trying to trace why a state script doesn't quite get the orientation right...

2011-01-30 Thread Robert Hanson
Jonathan, can you send me one of those zip files?

On Sat, Jan 29, 2011 at 8:39 PM, Jonathan Gutow gu...@uwosh.edu wrote:

 I'm looking for suggestions of things to look for.  Within the SAGE math
 package I use a state script generated by the applet that I have saved as a
 string to recreate the view the user had in a previous applet in a new one.
  The problem is that everything but the final moveto of the _set
 PerspectiveState() call is being executed properly when I pass this string
 to the applet.  If I copy the string into the console of an active applet
 everything works exactly as expected.  Passing the string as the script when
 the applet is initialized doesn't work.  Any ideas what I should look for?
  I'm using 12.0.28 and this worked with all the 11.X versions.  I haven't
 tried backtracking the 12.X versions.  Do I need to do this?  I don't think
 the misplaced semi-colons Bob and I discussed earlier are the problem.

 Jonathan
 Dr. Jonathan H. Gutow
 Chemistry Departmentgu...@uwosh.edu
 UW-Oshkosh  Office: 920-424-1326
 800 Algoma BoulevardFAX:920-424-2042
 Oshkosh, WI 54901
http://www.uwosh.edu/facstaff/gutow



 --
 Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
 Finally, a world-class log management solution at an even better
 price-free!
 Download using promo code Free_Logger_4_Dev2Dev. Offer expires
 February 28th, so secure your free ArcSight Logger TODAY!
 http://p.sf.net/sfu/arcsight-sfd2d
 ___
 Jmol-developers mailing list
 Jmol-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/jmol-developers




-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107


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
--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers


[Jmol-developers] Still trying to trace why a state script doesn't quite get the orientation right...

2011-01-29 Thread Jonathan Gutow
I'm looking for suggestions of things to look for.  Within the SAGE math 
package I use a state script generated by the applet that I have saved as a 
string to recreate the view the user had in a previous applet in a new one.  
The problem is that everything but the final moveto of the _set 
PerspectiveState() call is being executed properly when I pass this string to 
the applet.  If I copy the string into the console of an active applet 
everything works exactly as expected.  Passing the string as the script when 
the applet is initialized doesn't work.  Any ideas what I should look for?  I'm 
using 12.0.28 and this worked with all the 11.X versions.  I haven't tried 
backtracking the 12.X versions.  Do I need to do this?  I don't think the 
misplaced semi-colons Bob and I discussed earlier are the problem.

Jonathan
 Dr. Jonathan H. Gutow
Chemistry Departmentgu...@uwosh.edu
UW-Oshkosh  Office: 920-424-1326
800 Algoma BoulevardFAX:920-424-2042
Oshkosh, WI 54901
http://www.uwosh.edu/facstaff/gutow


--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers