Types of Event Handlers

OpenInsight’s powerful Form Designer provides developers with access to the multitude of events that occur during a users interaction with a data entry form. For example, you can add special processing when a user moves to a particular control (GOTFOCUS event) or if the user right clicks on a control.

There are three basic types of event handlers:

  1. User Code - BASIC+ code you create.

  2. System Events – Standard system procedures like READ and SAVE

  3. QuickEvents - An event handler defined non-procedurally by the application developer using the QuickEvent Builder tool in the Form Designer.

For example, you may wish to display some help text in a status line on your form as the user moves between controls. To do this you would typically add some Basic+ code on the GOTFOCUS event for each control on your form.

In a window, which may have over 100 controls, this requires a call for each control. An alternate way to accomplish the same functionality would be to create a promoted event. You can think of a Promoted Event as a “Global Event”, an event that will trigger for all controls on a single form, for all controls of a particular type (such as an Edit Table), or for all forms in your application. By using a promoted event, you do not need to add code to each control individually, which makes development much faster. It's even possible to create one event handler for all events in an application.

In this example, we will create a promoted event that will trigger for every GOTFOCUS event for every control in our application.

  • No labels