Events

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  UModel Programmer's Reference > Scripting Editor >

Events

The Events folder of the scripting project (see screenshot below) contains folders for the following type of events:

 

Application Events
Document Events
Transaction Events
UMLData Events
Focused UMLData Events

 

Note that these events are UModel-specific, as opposed to Form-based events. Each of the folders listed above contains a set of events for which Event Handler scripts can be written.

 

Application Events, for example, are shown in the screenshot below.

 

To access the event handler script of any of these events, right-click the event and select Open from the context menu. The script will be displayed in the Main Window (see screenshot below) and can be edited there. After you have finished editing the script, save changes by clicking the Save command in the toolbar of the Scripting Editor.

 

scr-umevent

 

 

Note the following points:

 

Event Handlers need function headers with the correct spelling of the event name. Otherwise the Event Handler will not be called.
It is possible to define local variables and helper functions within Macros and Event Handlers. In order for events to be processed, the Process Events options must be toggled on in the Scriptings options of UModel. See Scripting Projects in UModel for details.
Also see Programming Points.

 


© 2019 Altova GmbH