TRIGGER:
path: NUWIKI:DIFFERENT > CAROL RUDZINSKI > DENNIS WEAVER > BARRY REID > TRIGGER:
Event Triggers (Methods)
Programmable control events. These are methods triggered by an event within the ruleset.
Some triggers are user initiated
while others occur as a matter of course within the ruleset process.
Nucleus event triggers have two main types:
- ID event triggers
- ID triggers occur in relation to the controlling key (iconv, genid) and the ruleset as a whole which include compile, load, postread, prewrite, postwrite, predelete, etc.
- Field event triggers
- Field triggers occur during processing of specific field objects and include prefield, postfield, validation, input and output conversion.
Triggers include:
- Initialization
- Rule Compile Time
- Help event
- Console/ATGUI Hot spot or button
- Rule Load Time
- Item Post-read
- Display correlative
- Pre-Field processing
- Input conversion
- In-field processing
- Output conversion
- Post-Field
- Pre-File
- Post-File
- Post-Delete +
- Special (jump) commands
- Validation
- Exit time
- Messaging
- Choice or pop-up selection
- Record ID generation
- Field Delete
- Input Timeout
- Post-Column-Sort
- KeyIn event
- Cross Page (NuForm ONLY!)
- Unload
- Pre-delete
- Wrap up
- Commandmenu
Incorporating an event Trigger
To incorporate an event "Trigger", an events call or trigger event must be defined in the appropriate area within the Screen dictionaries. SCRDICTS are defined within WINMAINT either by a JUMP from the Nucleus script to the Screen dictionary or by selecting the "Screen dictionary" option from the WINMAINT menu.
Event code
In order to process a Nucleus event, the programmer may use either access-like codes or call a customized subroutine.
For convenience and in order to keep all customized events code in a single place, a generalized event subroutine is created when a script is compiled. The generalized subroutine is the suggested place for storage of event methods.
The default naming convention is:
where ScreenName is the name of your screen created using the WINMAINT development environment. The subroutine SUBS.ScreenName, is created by WINMAINT in the file called ISUB, in the data area ISUB,S.
The SUBS item can be modified by:
- Jump from an associated trigger event
- Using source code control, edit the item, as:
- * USC ISUB,S SUBS.ScreenName
- From Winmaint, selecting edit Subroutine
See also:
- Article: Enforcing data integrity in the Pick/Nelson model
- Event processing codes
- Passing data using a Passlist technique
- Nucleus Query Language
- Creating the Trigger