User Tools

Site Tools


datasourceconnectionsinmistudio

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
datasourceconnectionsinmistudio [2024/02/23 14:33] – [Debugging JavaScript] amywdatasourceconnectionsinmistudio [2024/02/23 16:50] (current) – [Debugging JavaScript] amyw
Line 201: Line 201:
 You have to go to the 35th line in the JavaScript code and find that you forgot to enclose a boolean condition statement with parentheses. Sometimes it is easier to find the nth line in the code by copying the JavaScript into a text editor that will display line numbers. You have to go to the 35th line in the JavaScript code and find that you forgot to enclose a boolean condition statement with parentheses. Sometimes it is easier to find the nth line in the code by copying the JavaScript into a text editor that will display line numbers.
  
-Another common syntax error is forgetting a quote on a String. If you see "SyntaxError: unterminated string literal (JavaScript; line 12)" look on line 12 of the script and make sure you have quotes around the string in the line. For example, sql="SELECT "+ mno + " from table1); needs to be changed to sql="SELECT "+ mno + " from table1");+Another common syntax error is forgetting a quote on a String. If you see  
 +<code> "SyntaxError: unterminated string literal (JavaScript; line 12)"</code> 
 +look on line 12 of the script and make sure you have quotes around the string in the line. For example,  
 + 
 +<code> sql="SELECT "+ mno + " from table1); needs to be changed to sql="SELECT "+ mno + " from table1");</code>
  
 **Execution Errors** **Execution Errors**
 +
 Once the interpreter gets past the syntax check, it will try to execute the code, top down. Functions are not evaluated until called. Typical errors at this stage do not tell you any line numbers. Here are some examples and causes. Once the interpreter gets past the syntax check, it will try to execute the code, top down. Functions are not evaluated until called. Typical errors at this stage do not tell you any line numbers. Here are some examples and causes.
 +
  
 **TypeError: Cannot convert null to an object** **TypeError: Cannot convert null to an object**
Line 228: Line 234:
  
 This error will say  This error will say 
 +
 <code> "JavaScript Error: Internal Error: TypeError: undefined is not a function."</code> <code> "JavaScript Error: Internal Error: TypeError: undefined is not a function."</code>
 +
 This will happen if you are calling a server method such as <code> myServer->getValueObject()</code> and you mistype the method name or if the method does not exist for the bean. For example, this will cause an error: This will happen if you are calling a server method such as <code> myServer->getValueObject()</code> and you mistype the method name or if the method does not exist for the bean. For example, this will cause an error:
  
Line 258: Line 266:
 stateString = CombineStrings -> getStringValue(); stateString = CombineStrings -> getStringValue();
 </code> </code>
 +
 or or
 +
 <code> <code>
 stateString = "Hello"; stateString = "Hello";
Line 268: Line 278:
  
  
-((A DataSourceConnections.frx file is attached for you to download and add to your applications directory. You could open the DataSourceConnections application to see the examples. The Design Window has descriptions and the Diagram window is the place to see all the connections and data flows.+((**A DataSourceConnections.frx file is attached for you to download and add to your applications directory. You could open the DataSourceConnections application to see the examples. The Design Window has descriptions and the Diagram window is the place to see all the connections and data flows.**
  ))  ))
  
datasourceconnectionsinmistudio.1708716816.txt.gz · Last modified: by amyw

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki