I guess JSmol is incompatible with certain uses of String. In particular,
when JSmol is initialized,

"x".toString()

becomes a "String Object", not just a simple string, as it must. There is
no way around that.

jqGrid in one place then uses the strictly equals "===" to compare the
desired row id to the id attribute of a table row:

                    if( rowid.toString() === this.rows[i].id) {...}

Well, that won't work now, because rowid.toString() is an object, and
this.rows[i].id is a string.

The use of === is unnecessary here. A table row attribute is guaranteed to
be a string, and so is x.toString().
So == is sufficient. It's just a bit of overkill on the part of the jqGrid
developers.

I'm not sure why it is specific to Chrome.

Bob




On Fri, Jan 16, 2015 at 5:27 AM, Markus Wiederstein <mar...@came.sbg.ac.at>
wrote:

> Hi developers,
>
> we recently noticed a curious effect of JSmol initialization on looping
> over an array in JavaScript: it seems that the construct 'for (var i in
> data)' does not work in the expected way anymore after JSmol
> initialization.  More precisely, the loop is not only over the keys of the
> array but also includes apparent methods of the array(?) object.
>
> Here's a small test page that illustrates this behaviour:
>
> http://topsearch.services.came.sbg.ac.at/jsmol_bug_mini.html
>
> The nasty thing about this is that it seems to prevent JSmol to work
> properly with jqGrid in Chromium (see 3. in test page).
>
> We are currently stuck in trying to find out what's going on here...
>
> Any help is greatly appreciated,
> with best regards,
>
> -Markus
>
>
> --
> Dr. Markus Wiederstein, Assoc. Prof.
> University of Salzburg
> Department of Molecular Biology
> Division of Bioinformatics /
> Center of Applied Molecular Engineering
> Hellbrunnerstr. 34
> A-5020 Salzburg
> Tel: +43 662 8044 5794
>
>
> ------------------------------------------------------------------------------
> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
> GigeNET is offering a free month of service with a new server in Ashburn.
> Choose from 2 high performing configs, both with 100TB of bandwidth.
> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
> http://p.sf.net/sfu/gigenet
> _______________________________________________
> Jmol-developers mailing list
> Jmol-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-developers
>



-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Department of Chemistry
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
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to