Sign in Join
FPDoc Onlineexperiment

TCustomApplication class

In unit CustApp

Ancestor class for TApplication classes.

Declaration

pascal
TCustomApplication = class(TComponent)

Inheritance

  1. TCustomApplication
  2. TComponent
  3. TPersistent
  4. TObject

Descends from it: TApplication TCustomDaemonApplication TCustomWebApplication

Description

TCustomApplication is the ancestor class for classes that wish 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.

Properties

ExeNamepublicName of the executable.
HelpFilepublicLocation of the application help file.
TerminatedpublicWas Terminate called or not.
TitlepublicApplication title.
ConsoleApplicationpublicIs the application a console application or not.
LocationpublicApplication location.
ParamspublicCommand-line parameters.
ParamCountpublicNumber of command-line parameters.
EnvironmentVariablepublicEnvironment variable access.
OptionCharpublicCommand-line switch character.
CaseSensitiveOptionspublicAre options interpreted case sensitive or not.
CaseSensitiveShortOptionspublic
CaseSensitiveLongOptionspublic
StopOnExceptionpublicShould the program loop stop on an exception.
ExceptionExitCodepublicExitCode to use then terminating the program due to an exception.
EventLogFilterpublicEvent to filter events, before they are sent to the system log.
SingleInstancepublicSingle instance used to control single application instance behaviour.
SingleInstanceClasspublicClass to use when creating single instance.
SingleInstanceEnabledpublicEnable single application instance control.

Methods

GetOptionAtIndexprotected
SetTitleprotected
GetConsoleApplicationprotected
DoRunprotected
AbortRunprotected
GetParamsprotected
GetParamCountprotected
DoLogprotected
CreatepublicCreate a new instance of the TCustomApplication class.
DestroypublicDestroys the TCustomApplication instance.
HandleExceptionpublicHandle an exception.
InitializepublicInitialize the application.
RunpublicRuns the application.
ShowExceptionpublicShow an exception to the user.
TerminatepublicTerminate the application.
FindOptionIndexpublicReturn the index of an option.
GetOptionValuepublicReturn the value of a command-line option.
GetOptionValuespublicGet the values for an option that may be specified multiple times.
HasOptionpublicCheck whether an option was specified.
CheckOptionspublicCheck whether all given options on the command-line are valid.
GetNonOptionspublicGet all non-switch options.
GetEnvironmentListpublicReturn a list of environment variables.
LogpublicWrite a message to the event log.

Events

OnExceptionpublicException handling event.

Inherited

From TComponent (74)

_AddRef _Release BeforeDestruction CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DefineProperties DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetChildren GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetParentComponent GetTypeInfo GetTypeInfoCount HasParent iicrGetComponent InsertComponent Invoke IsImplementorOf Loaded Loading Name Notification ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReadState ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetChildOrder SetDesigning SetDesignInstance SetInline SetName SetParentComponent SetSubComponent Tag ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState

From TPersistent (5)

Assign AssignTo FPOAttachObserver FPODetachObserver FPONotifyObservers

From TObject (37)

AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName

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