Knowledge Base
cancel
Showing results for 
Search instead for 
Did you mean: 

TGML Graphic Alert: Unable to cast object of type 'org.mozilla.javascript.UniqueTag' to type 'org.mozilla.javascript.Function'.

Issue

TGML Graphic Alert:  Unable to cast object of type 'org.mozilla.javascript.UniqueTag' to type 'org.mozilla.javascript.Function'.

Environment

Vista Workstation 5

TGML Graphic

Cause

A script tag somewhere in the TGML graphic file has a function defined in the Behavior attributes that does not have a corresponding function in the script Content.

Resolution

  1. This error tells you that a script tag in the file has a function defined but not used.  It does not tell you which script tag it is.  The first step is to identify which script tag has the extra function defined.
     
  2. Click on the script tag.  Look at the Behavior attributes.  Compare the function names defined next to the events with the content of the script.  Click the "..." button next to the Content attribute to open the script editor.

         

    In this example, the event OnDocumentLoad has a function named "load" defined.  But in the content of the script there is no function load defined.
     
  3. Identify the unused event and delete the function name assigned to that event.

See also Lessons Learned Article #4835.
 

Tags (1)
Labels (1)
Version history
Revision #:
1 of 1
Last update:
2 weeks ago
Updated by: