TApplication.UpdateAction function
Signals an OnActionUpdate handler (when assigned).
Declaration
function UpdateAction(TheAction: TBasicAction): Boolean; overrideArguments
TheAction | The action updated in an event handler. |
Function result
True if the action was updated in the event handler.Description
UpdateAction is an overridden
Boolean function used to
signal an
OnActionUpdate event handler (when assigned) to update
the settings in the action instance in
TheAction. UpdateAction
reimplements the method defined in the ancestor (TComponent), and does
not call the inherited method.
UpdateAction signals a TActionEvent event handler using the action instance
in TheAction as an argument. The Handled argument in the event is
used as the return value for the method, and is set to True if the
action was successfully updated in an event handler.
In LCL version 3.0 or higher, multiple handler routines can be assigned which use the ahtActionUpdate event type. This situation can occur when TApplicationProperties tries to assign an OnActionUpdate handler to the TApplication instance and it already has a user-specified handler. It can also happen when the AddOnActionUpdateHandler method is called directly to add a handler routine for the application event type.
If OnActionUpdate handler is not assigned, or returns False, the other handlers in the internal list are signalled to determine whether they can update the action. Each handler routine is signalled until one of them changes the Handled argument in the event type to True. If none of the routines can update the action, the return value is False.
Modified in in LCL version 3.0 to provide support for multiple OnActionUpdate event handlers in the application.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
