Concept : Understanding Triggered Functions
Contents |
[edit] Description
The Trigger property (found on the Behavior tab of the Property Editor) is available on a function (part of the Model) in your project and on the Model and View functions within a connection in your project.
For a function, the Trigger property allows you to select an object that will trigger the execution of the function. Whenever the selected object's value changes, the function is executed with the arguments you specify when setting up the trigger. For example, in the screen shot below, the trigger is set to count. This function has two arguments, arg (set to myFile) and arg1 (set to count). Whenever the value of count changes, this function is executed with the fields, myFile and count, passed in as arguments.
For a trigger on View or Model code, you only need to set the object that serves as the trigger. The arguments are defined by the system. For example, in the screen shot below, the trigger is set to formChoice. Whenever the value of formChoice changes, the Model code for the FormAdapter in this DynamicFormConnection, is executed. You can add statements to the Model or View code.
[edit] See Also
Setting a Trigger on a Function
Trigger Property
[edit] Tags
Categories: Concept | Trigger | Function