[Overview][Constants][Types][Classes][Procedures and functions][Variables] | Reference for unit 'Classes' (#fcl)

# TBasicAction

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

Abstract base class for all Actions.

## Declaration

`type TBasicAction = class(TComponent)`
`protected`
`FClients: TList;` |  | List with components linked to this action.
`procedure Change; virtual;` |  | Calls the OnChange handler.
`procedure SetOnExecute(); virtual;` |  | Assigns an OnExecute event handler
`property OnChange: TNotifyEvent; [rw]` |  | Occurs when one of the action's properties changes.
`public`
`constructor Create(); override;` |  | Creates a new instance of a TBasicAction class.
`destructor Destroy; override;` |  | Destroys the action.
`function HandlesTarget(); virtual;` |  | Determines whether Target can be handled by this action
`procedure UpdateTarget(); virtual;` |  | Notify client controls when the action updates itself.
`procedure ExecuteTarget(); virtual;` |  | Executes the action on the Target object
`function Execute; dynamic;` |  | Triggers the OnExecute event
`procedure RegisterChanges();` |  | Registers a new client with the action.
`procedure UnRegisterChanges();` |  | Unregisters a client from the list of clients
`function Update; virtual;` |  | Triggers the OnUpdate event
`property ActionComponent: TComponent; [rw]` |  | Returns the component that initiated the action.
`property OnExecute: TNotifyEvent; [rw]` |  | Event triggered when the action executes.
`property OnUpdate: TNotifyEvent; [rw]` |  | Event trigged when the application is idle.
`end;`

## Inheritance

`TBasicAction` |  | Abstract base class for all Actions.
`TComponent` |  | Base class for all components that need owner-owned functionality.
`TPersistent` |  | Base class for streaming system and persistent properties.
`TObject`

## Description

TBasicAction implements a basic action class from which all actions are derived. It introduces all basic methods of an action, and implements functionality to maintain a list of clients, i.e. components that are connected with this action.

Do not create instances of TBasicAction. Instead, create a descendent class and create an instance of this class instead.

## See also

TBasicActionLink |  | Link between actions and action clients (e.g. controls)
TComponent |  | Base class for all components that need owner-owned functionality.