trigger apStart

System trigger that starts the application environment and controls the interaction of the application with the component manager.

Declaration: trigger apStart
Applies to Application Shell
Activation: Automatically activated when a Uniface application is started.
Default behavior: Executes done.
Behavior upon completion: If the value of $status is negative as the application ends, Uniface reports an error. Values in the range in the range 32,768 through 65,535 are also regarded as being negative.

Description

The ProcScript in the apStart trigger is responsible for handing control of the application to the component manager. This can happen in several ways:

  • When an activate (or run) statement is encountered that starts a modal form.
  • After the last activate of a sequence of non-modal forms.
  • If the end of the apStart trigger is reached without encountering a run statement (regardless of the value of $status).

The apStart trigger often includes statements that set the language and library.

Note:  If you explicitly set the $language and $variation codes in this or any other trigger, the application ignores the corresponding settings in the applicable assignment files.

This trigger should also be used to open any database that requires explicit logon information. For example:

open "|scott|tiger","orapath"

Uniface Server

For the Uniface Server, this trigger is fired when it starts (either pre-started, or on demand by the Uniface Router). If it is empty, the Uniface Server performs no specific actions at startup. This does not influence any subsequent behavior because the apStart trigger is not part of any request the Uniface Server has to handle.

Related Topics