Declaration¶
Source position: classesh.inc line 2764
type
TBasicAction = class(TComponent)
public
constructor Create;
destructor Destroy;
function HandlesTarget : Boolean;
procedure UpdateTarget;
procedure ExecuteTarget;
function Execute : Boolean;
procedure RegisterChanges;
procedure UnRegisterChanges;
function Update : Boolean;
function Suspended : Boolean;
property ActionComponent: TComponent; {rw}
property OnExecute: TNotifyEvent; {rw}
property OnUpdate: TNotifyEvent; {rw}
property Clients[Idx : Integer]: TObject; {r}
end;
Inheritance¶
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 descendant class and create an instance of this class instead.
Properties¶
| Member | Visibility | Description |
|---|---|---|
| ActionComponent | public | Returns the component that initiated the action. |
| Clients read only | public |
Methods¶
| Member | Visibility | Description |
|---|---|---|
| Create | public | Creates a new instance of a TBasicAction class. |
| Destroy | public | Destroys the action. |
| Execute | public | Triggers the OnExecute event. |
| ExecuteTarget | public | Executes the action on the Target object. |
| HandlesTarget | public | Determines whether Target can be handled by this action. |
| RegisterChanges | public | Registers a new client with the action. |
| Suspended | public | |
| UnRegisterChanges | public | Unregisters a client from the list of clients. |
| Update | public | Triggers the OnUpdate event. |
| UpdateTarget | public | Notify client controls when the action updates itself. |
Events¶
| Member | Visibility | Description |
|---|---|---|
| OnExecute | public | Event triggered when the action executes. |
| OnUpdate | public | Event triggered when the application is idle. |
See also¶
| Name | Description |
|---|---|
| TBasicActionLink | Link between actions and action clients (e.g. controls). |
| TComponent | Base class for all components that need owner-owned functionality. |