[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'ActnList' (#lcl)

CreateAction

Creates a new TBasicAction instance with the specified owner and class type.

Declaration

Source position: actnlist.pas line 289

function CreateAction(

  TheOwner: TComponent;

  ActionClass: TBasicActionClass

):TBasicAction;

Arguments

TheOwner

  

Component which owns the new class instance.

ActionClass

  

Class type for the action instance created in the routine.

Function result

TBasicAction instance allocated in the routine.

Description

CreateAction is a TBasicAction function used to create a new instance of the action class type in ActionClass with the TheOwner as the owner of the new class instance. Calls the CreateActionProc routine to create the new class instance. Raises an Exception with the message in SInvalidActionCreation if the CreateActionProc constant has not been assigned.


Version 3.2 Generated 2024-02-25 Home