TGML Graphic Alert: TypeError: getCurrentTargets is not a function. (cmd#16)

Issue

TGML Graphic Alert: TypeError: getCurrentTargets is not a function. (cmd#16)

Product Line

TAC Vista

Environment

Vista 5

TGML Graphic

Cause

A Javascript tag in the TGML file has called an invalid function.

Resolution

  1. Determine which script tag is generating the error.
    1. When did the error occur?  When the page loaded?  When a value changed?  When the user clicked?  Did it happen once or multiple times?  These questions can help you narrow down which script has thrown the error.
    2. Save the graphic under a different name.  Delete portions of the graphic until the error clears.  The component that was removed holds the offending script.
  2. The cmd# syntax is indicating which line of the script has the error.  Launch the script editor by clicking the "..." button next to the script Content attribute.  In this example, go to line 16 of the code.
  3. The text after TypeError: indicate the offending function.  In this example getCurrentTargets is not a function.  The correct function is getCurrentTarget (without the s).
  4. Correct the invalid function.