Bob,
I get the basic flow of what's happening below, so I'll try. My JavaScript is
pretty primitive and chaotic, so you'll have considerable clean up to do!
Otis
--
Otis Rothenberger
o...@chemagic.com
http://chemagic.com
On Jan 11, 2013, at 10:47 AM, Robert Hanson wrote:
> That will take a bit of work. I seem to have missed that. What we are doing
> there is setting up the MOL file date line. Maybe you can help me by writing
> the JavaScript equivalent of this:
>
> StringXBuilder mol = new StringXBuilder();
> String version = Viewer.getJmolVersion();
> Calendar c = Calendar.getInstance();
> mol.append("\n__Jmol-").append(version.substring(0, 2));
> TextFormat.rFill(mol, "_00", "" + (1 + c.get(Calendar.MONTH)));
> TextFormat.rFill(mol, "00", "" + c.get(Calendar.DAY_OF_MONTH));
> mol.append(("" + c.get(Calendar.YEAR)).substring(2, 4));
> TextFormat.rFill(mol, "00", "" + c.get(Calendar.HOUR_OF_DAY));
> TextFormat.rFill(mol, "00", "" + c.get(Calendar.MINUTE));
> mol.append("3D 1 1.00000 0.00000 0");
> // This line has the format:
> // IIPPPPPPPPMMDDYYHHmmddSSssssssssssEEEEEEEEEEEERRRRRR
> // A2<--A8--><---A10-->A2I2<--F10.5-><---F12.5--><-I6->
> mol.append("\nJmol version ").append(Viewer.getJmolVersion()).append(
> " EXTRACT: ").append(Escape.escape(bs)).append("\n");
>
>
> Bob
>
>
> On Thu, Jan 10, 2013 at 12:58 PM, Otis Rothenberger <osrot...@chemagic.com>
> wrote:
> Bob,
>
> With JSmol, I'm getting an error message that I don't understand. I'm getting
> the same message in different contexts:
>
> TypeError: 'undefined' is not an object (evaluating
> 'java.util.Calendar.getInstance') 58490
> http://chemagic.com/JSmol/j2s/core/core.z.js
>
> Most recently, I get this with:
>
> set picking ON;set atomPicking ON;set picking assignAtom_C
>
> I do NOT get this error if I put it into your Test2 page. In my own page, I
> get the error on my first click. After that all seems OK.
>
> In the past, I got this same error when I tried to use getPropertyAsString to
> extract the molfile. In this case, I cannot get the extracted molfile.
>
> Does anything obvious come to mind on this error message?
>
> I should mention that I am currently using pre model kit mode pick callback
> code to replace atoms until I find the nature of this problem.
>
> Otis
>
> --
> Otis Rothenberger
> o...@chemagic.com
> http://chemagic.com
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122712
> _______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> 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
>
> ------------------------------------------------------------------------------
> Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
> much more. Get web development skills now with LearnDevNow -
> 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
> SALE $99.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122812_______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users