Trigger_RegisterProcedure()

Examples


The Trigger_RegisterProcedure() function registers a procedure trigger for use with the runtime engine. A procedure trigger is activated when the specified procedure is run.

Syntax

Trigger_RegisterProcedure(script procedure {of form form_name}, attach_type, script processing_procedure {, tag})

Parameters

script procedure The procedure for which the procedure trigger is registered. When this procedure is run, the procedure trigger is activated.

of form form_name – An optional parameter specifying a form name. Use this only if procedure is a form procedure.

attach_type – An integer indicating when the procedure trigger is activated, relative to the original procedure:

[spacer]

Constant

Value

TRIGGER_BEFORE_ORIGINAL

1

TRIGGER_AFTER_ORIGINAL

2


script processing_procedure – A procedure you write that runs in response to the procedure trigger.

tag – An optional returned integer that uniquely identifies the trigger. This value is used when you want to unregister, enable or disable the trigger individually.

Return value

An integer corresponding to the following constants:

[spacer]

Constant

Value

Description

SY_NOERR

0

No error occurred.

SY_UNKNOWN

1

An unknown error occurred and the trigger was not registered.

SY_INVALID_SCRIPT

2

The trigger processing script was either not found or had the wrong number of parameters. The trigger was not registered.



Documentation Feedback