Record scripts are a generic form of hook that are called in response to an event on a Rational ClearQuest form or from other hooks. En règle générale, les scripts d'enregistrement sont utilisés pour implémenter une action démarrée lorsque l'utilisateur clique sur un bouton de commande ou sur un élément de menu contextuel associé à un champ de formulaire Rational ClearQuest. Record scripts are scripts that can be executed within the context of one record type.
If you associate a record script to a push button, when a user pushes the button, the script is executed.
All record scripts have the following syntax:
Function RecordTypeName_ScriptName (param) ' input param As Variant 'The content of the script... End Function
sub RecordTypeName_ScriptName { my($result); my($param) = @_; # The content of the script ... return $result; }
Lorsqu'il est associé à un contrôle de formulaire, le paramètre transmis à la méthode contient une instance de la classe EventObject. Cette instance contient des informations concernant l'événement à la suite duquel le point d'ancrage a été appelé. (See Form Control Events for information on these events.)
When calling a record script from another hook, the parameter you pass into the method is a Variant containing whatever data is appropriate. If the record script returns data to the calling hook, that information is returned as a Variant as well.
You can associate one or more record scripts to a form control.