[Overview][Types][Classes][Variables][Index] Reference for unit 'CustApp' (#fcl)

TCustomApplication

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Ancestor class for TApplication classes.

Declaration

Source position: custapp.pp line 29

type TCustomApplication = class(TComponent)

public

  constructor Create(); override;

  

Create a new instance of the TCustomApplication class

  destructor Destroy; override;

  

Destroys the TCustomApplication instance.

  procedure HandleException(); virtual;

  

Handle an exception.

  procedure Initialize; virtual;

  

Initialize the application

  procedure Run;

  

Runs the application.

  procedure ShowException(); virtual;

  

Show an exception to the user

  procedure Terminate; virtual;

  

Terminate the application.

  function FindOptionIndex();

  

Return the index of an option.

  function GetOptionValue();

  

Return the value of a command-line option.

  function HasOption();

  

Check whether an option was specified.

  function CheckOptions();

  

Check whether all given options on the command-line are valid.

  procedure GetEnvironmentList();

  

Return a list of environment variables.

  procedure Log();

  

Write a message to the event log

  ExeName: ;

  

Name of the executable.

  HelpFile: ;

  

Location of the application help file.

  Terminated: Boolean;

  

Was Terminate called or not

  Title: ;

  

Application title

  OnException: TExceptionEvent;

  

Exception handling event

  ConsoleApplication: Boolean;

  

Is the application a console application or not

  Location: ;

  

Application location

  Params: ;

  

Command-line parameters

  ParamCount: Integer;

  

Number of command-line parameters

  EnvironmentVariable: ;

  

Environment variable access

  OptionChar: Char;

  

Command-line switch character

  CaseSensitiveOptions: Boolean;

  

Are options interpreted case sensitive or not

  StopOnException: Boolean;

  

Should the program loop stop on an exception

  EventLogFilter: TEventLogTypes;

  

Event to filter events, before they are sent to the system log

end;

Inheritance

TCustomApplication

  

Ancestor class for TApplication classes.

|

TComponent,IUnknown,IInterfaceComponentReference

|

TPersistent,IFPObserved

|

TObject

Description

TCustomApplication is the ancestor class for classes that whish to implement a global application class instance. It introduces several application-wide functionalities.

Descendent classes need to override the DoRun protected method to implement the functionality of the program.


Documentation generated on: Oct 27 2012