Monday, July 23, 2018

GWT behaves differently in Chrom vs Firefox

Friends:

I have an application written using GWT 2.8.2 framework and it behaves differently. The snippet of the GWT code in question is here -
(ReferenceError) : L_g_g$ is not defined


     
for (int j = 1; j < nodes.size(); j++) {
       
Node previousNode = nodes.get(j - 1);
       
Node currentNode = nodes.get(j);
       
int indexFrom = previousNode.getIndex();
       
int indexTo = currentNode.getIndex();

       
if (!connectionMatrix[indexFrom][indexTo]) {
          connectionMatrix
[indexFrom][indexTo] = true;
          connectionMatrix
[indexTo][indexFrom] = true;
          contributed
= true;
         
BondTriple bondTriple = new BondTriple(indexFrom, indexTo);


The last line of the above code snippet is the Culprit. It works as expected in FireFox, in Chrome however, it throws "L_g_g$ is not defined" error. In debugger mode I found that L_g_g$ refers to the BondTriple as highlighted here > BondTriple bondTriple = new BondTriple(indexFrom, indexTo);

This code has been thoroughly unit tested and every functionality was verified. The fact that it works in Firefox but fails in Chrome baffles me even more. BondTriple defined as below. I'm using non-primitive attributes to check for null. Have anyone ran into a situation like this? I'm having hard time figuring out what could be wrong. Your help will be greatly appreciated.

public class BondTriple implements Jsonable {
 
private Integer start;
 
private Integer finish;
 
private Integer bondType;
 
private Shape connector;

 
public BondTriple(Integer start, Integer finish) {
   
this.start = start;
   
this.finish = finish;
 
}
...



--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment