Altova StyleVision 2025 Enterprise Edition

Your scripting project may optionally include scripts that handle events in the Authentic View, such as cutting, copying, or pasting text, or opening a context menu. These events are provided by the StyleVision COM API, and you can find them in the "Events" folder of your scripting project. Note that these events are StyleVision-specific, as opposed to form events.

 

To create an event handler script, right-click an event, and select Open from the context menu (or double-click the event). The event handler script is displayed in the main window, where you can start editing it. For example, the event handler illustrated below calls a function when a toolbar button is executed. The function definition is in the Global Declarations script, so it is available to the event handler script.

scr_event_stylevision

The name of the event handler function must not be changed; otherwise, the event handler script will not be called.

 

You can optionally define local variables and helper functions within event handler scripts, for example:

 

var local;
 
function On_AuthenticLoad(  )
{
  local = "OnAuthenticLoad";
  Helper();  
}
 
function Helper()
{
  alert("I'm a helper function for " + local);
}

© 2018-2024 Altova GmbH