Menu

#581 TypeError: Clazz.innerFunctions is undefined

v10
open
nobody
None
5
2016-06-23
2016-05-27
Mark Perri
No

Sometimes when loading JSmol (from Jmol-14.6.0) I get the error below (approx. 1/4 times). Usually refreshing the page gets rid of it. It seems to only happen on pages that I use jquery on. I've tried jquery 1.9.1, 1.10.2, 1.11.0, and 1.12.2 and the version makes no difference. I've only tried on firefox so far. Do you know what I can do to fix this?

TypeError: Clazz.innerFunctions is undefined loading file /jsmol/j2s/java/util/Random.js java.util.Random
0 function (c,d,g,j,l)
1 function (a)
2 function (c,g)
3 function (c,d,e,g)
4 function (c,d,g,j,l)
5 function (a)
6 function (c,g)
7 function (c,d,e,g)
8 function (c,d,g,j,l)
9 function (a)
10 function (c,g)
11 function (c,d,e,g)
12 function (c,d,g,j,l)
13 function (a)
14 function (c,g)
15 function (c,d,e,g)
16 function (c,d,g,j,l)
17 function (a)
18 function (c,g)
19 function (c,d,e,g)
20 function (c,d,g,j,l)
21 function (a)
22 function (c,g)
23 function (c,d,e,g)
24 function (c,d,g,j,l)

Related

Bugs: #581

Discussion

  • Mark Perri

    Mark Perri - 2016-05-27

    Moving the Jmol initialization into window.onload instead of $(document).ready(function() seems to have fixed it. I haven't had the error come back so far.

     
  • Bob Hanson

    Bob Hanson - 2016-05-28

    That is not an adequate solution. The applet must be able to be defined in $(document).ready. The only calls to Clazz.innerFunctions are in .js files that are never supposed to be loaded, namely java.lang.number.js, java.lang.string.js, java.lang.class.js, java.lang.classext.js. These are all classes that are already part of j2sjmol.js, which is included in corejmol.js.

    So if any of these classes are being loaded, it would appear that corejmol.js is not being loaded. Could I see what the code is in your $(document).ready function?

     
    • Bob Hanson

      Bob Hanson - 2016-05-28

      What I could do is move the definition of java.util.Random in the file up
      ahead of java.util.AbstractCollection, which is requiring it.

      On Fri, May 27, 2016 at 7:12 PM, Bob Hanson hansonr@users.sf.net wrote:

      That is not an adequate solution. The applet must be able to be defined in
      $(document).ready. The only calls to Clazz.innerFunctions are in .js files
      that are never supposed to be loaded, namely java.lang.number.js,
      java.lang.string.js, java.lang.class.js, java.lang.classext.js. These are
      all classes that are already part of j2sjmol.js, which is included in
      corejmol.js.

      So if any of these classes are being loaded, it would appear that
      corejmol.js is not being loaded. Could I see what the code is in your
      $(document).ready function?


      Status: open
      Group: v10
      Created: Fri May 27, 2016 09:56 PM UTC by Mark Perri
      Last Updated: Fri May 27, 2016 10:01 PM UTC
      Owner: nobody

      Sometimes when loading JSmol (from Jmol-14.6.0) I get the error below
      (approx. 1/4 times). Usually refreshing the page gets rid of it. It seems
      to only happen on pages that I use jquery on. I've tried jquery 1.9.1,
      1.10.2, 1.11.0, and 1.12.2 and the version makes no difference. I've only
      tried on firefox so far. Do you know what I can do to fix this?

      TypeError: Clazz.innerFunctions is undefined loading file
      /jsmol/j2s/java/util/Random.js java.util.Random
      0 function (c,d,g,j,l)
      1 function (a)
      2 function (c,g)
      3 function (c,d,e,g)
      4 function (c,d,g,j,l)
      5 function (a)
      6 function (c,g)
      7 function (c,d,e,g)
      8 function (c,d,g,j,l)
      9 function (a)
      10 function (c,g)
      11 function (c,d,e,g)
      12 function (c,d,g,j,l)
      13 function (a)
      14 function (c,g)
      15 function (c,d,e,g)
      16 function (c,d,g,j,l)
      17 function (a)
      18 function (c,g)
      19 function (c,d,e,g)
      20 function (c,d,g,j,l)
      21 function (a)
      22 function (c,g)
      23 function (c,d,e,g)
      24 function (c,d,g,j,l)


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/jmol/bugs/581/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      --
      Robert M. Hanson
      Larson-Anderson Professor 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

       

      Related

      Bugs: #581

  • Mark Perri

    Mark Perri - 2016-06-23

    I just upgraded to jmol-14.6.0_2016.06.22 and I don't get this error anymore when initalizing from JSmol from $(document).ready(function()

     

Log in to post a comment.