Skip to main content
Version: Next

OBJECT SET ACTION

OBJECT SET ACTION ( {* ;} object ; action )

ParameterTypeDescription
*OperatorIf specified, object is an object name (string)
If omitted, object is a field or variable
objectanyObject name (if * is specified) or
Field or variable (if * is omitted)
actionTextName of action to associate (including parameters if necessary)

This command is not thread-safe, it cannot be used in preemptive code.

Description

The OBJECT SET ACTION command modifies the standard action associated with the object(s) designated by the object and * parameters.

Passing the optional * parameter indicates that the object parameter is an object name (string). If you do not pass this parameter, it indicates that the object parameter is a field or variable. In this case, you pass a field or variable reference instead of a string (field or variable object only).

In the action parameter, pass a string containing the name of the standard action to associate with the object, or a constant from the Standard Action theme. Optionally, the action can have parameters.

For detailed information on action names, please refer to the Standard actions section in the 4D Design Reference manual.

Compatibility Note: Legacy constants (prefixed by _o_ in the "Standard Action" theme) are deprecated starting with 4D v16 R3. However, they are still supported for compatibility.

Example

You want to associate the Validate standard action with a button:

 OBJECT SET ACTION(*;"bValidate";ak accept)

See also

_o_OBJECT Get action
OBJECT Get action