Edit

Standard Handlers

User-interface helper handlers with specific names are called automatically for active scripts. Handlers that implement these standard messages (and variants thereof) will be called in all active document scripts. By implementing these handlers in your script, you can override or extend the behaviour of MoneyWorks.

General event handlers

The standard handlers for general events are Load, Unload, UserLoggedIn, UserLoggingOut, AllowPostTransactions, PostedTransactions, and AllowDeleteRecords.

Window/UI event handlers

For overriding window behaviour, there are standard window handlers: Before, ItemHit, Validate, After, Cancel, Close, EnterField, ValidateField, ExitedField, EnterCell, ValidateCell, ExitedCell.

Report tweaking

There is also a SetupReport handler for tweaking reports before they are executed.

Standard window handlers are passed a windowRef identifying the specific instance of the window from which the message was sent. You can use this to access content of the specific window. Each kind of window is identified by a class name (or windowID) but this class name is not passed to the handler. Window handlers will usually be implemented with windowID-specific handler names incorporating the windowID (see Specific UI Element Handler Names), so its value is usually implicit. If you use a general handler, you can get the windowID from the windowRef using the GetWindowID(winRef) function.