Arbortext Command Language > Callbacks > window_add_callback
  
window_add_callback
window_add_callback (window, cbtype, callback[, "PREPEND"])
Appends callback to the list of callback functions to be called when the value of a dialog box item within window changes, or when another window-level event occurs. If "PREPEND" is specified, the callback is prepended to the list of callback functions instead. Functions are called in the order that they appear in the list. If window is invalid, $ERROR is set and 0 is returned. If successful, the function returns the unique window identifier.
The window parameter is a window identifier. A valid window identifier must be specified. (A value of 0 specifies “all windows”.) The cbtype parameter needs to be a valid callback type. (Refer to the following list of Valid window callback types.) The callback parameter specifies the actual callback to add. The "PREPEND" flag specifies that the callback should be prepended, not appended.
* 
If callback is already on the callback list for the window, the list is shuffled to place the callback into the desired position; the callback is not added to the list a second time.
* 
Arbortext Editor supports a single callback of each type per window.
Example
$ret = window_add_callback (window, cbtype, callback)
Refer to window_set and Callback Functions introduction for related information.
Refer to the following valid window callback types.