New in the Community? Get started here

Schneider Electric Exchange Community

Discuss and solve problems in energy management and automation. Join conversations and share insights on products and solutions. Co-innovate and collaborate with a global network of peers.

Register Now
Knowledge Base
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Discover the Exchange Community Top members of July 
Discover the latest features your community has to offer: register to the webinar here

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'.

Product Line

TAC Vista

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 or is misspelled in the script.

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. If this is not the issue, verify that the function names defined next to the events with the function names declared in the script editor for spelling errors. 
Tags (1)
Labels (1)
No ratings