Sign in Join
FPDoc Onlineexperiment

CustApp unit

Custom application class.

The CustApp unit implements the TCustomApplication class, which serves as the common ancestor to many kinds of TApplication classes: a GUI application in the LCL, a CGI application in FPCGI, a daemon application in daemonapp. It introduces some properties to describe the environment in which the application is running (environment variables, program command-line parameters) and introduces some methods to initialize and run a program, as well as functionality to handle exceptions.

Typical use of a descendent class is to introduce a global variable Application and use the following code:

Application.Initialize;
  Application.Run;

Since normally only a single instance of this class is created, and it is a TComponent descendent, it can be used as an owner for many components, doing so will ensure these components will be freed when the application terminates.

Classes and records

TCustomApplicationclassAncestor class for TApplication classes.

Types

TEventLogTypessetSet of TEventLogType.
TExceptionEventprocedure typeException handling event prototype.
TStringArraytypeHelper type: Array of strings.

Variables

CustomApplicationvariableGlobal application instance.

Uses

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.