enableTrigger
enableTrigger(
[ l_args ]
)
=> t / nil
Description
The enable trigger is a special routine loaded separately from the application context, normally by an autoload file.
The enable routine normally takes no arguments, and returns t or nil depending on whether the application passes or fails, respectively, the security checks required before the user can edit designs with it. This routine must not call any code in the application context. Therefore any routines needed should be included in the autoload file along with the enable trigger itself.
The enable trigger and its associated routines are placed in an autoload file rather than the application context because it will be called to determine whether an application is available to the user. If the application is not enabled, the application context is not needed. Thus putting this code in a separate autoload file eliminates the need to load the application context when the application is not enabled.
When registered with a view type, the enable trigger is called when trying to open a cellview of that view type. If it returns nil, the cellview will not be opened, and the Design Editor operation which initiated it fails. When registered in a customizer, the enable trigger is called when the customizer menu is built, thus causing the associated items to be disabled. In this manner, the user will not have access to the tool.
The enable trigger is also called when the user attempts to install a new application either by executing a customizer menu item or by calling deInstallApp. In this case, the enable trigger is passed the full set of trigger arguments. The enable trigger can use this argument list to do additional checking after the license check.
Arguments
Values Returned
Return to top