MSM-Workstation
Events

Alphabetic list

The various events that may occur in an event-driven environment as supported by MSM-Workstation are divided into a set of high level events and a set of low level events.

High level events are generated by MSM-ViEWBuilder's compiled structures and do not necessarily have counterpart in the MWAPI.

However, high level events are frequently caused by a corresponding low level event. For example, a Button has a low level select event and a high level Push event. Action logic may be attached to either, or to both. The select event logic is performed first, followed by the Push event logic. In fact, the select event logic can be made to prevent execution of the Push event logic by invoking code from the macro %%NotOK.

High level events

AddNew, Check, Choose, CommonCode, Create, DeleteRecord, Destroy, Enter, Error, Exit, Modified, MoveFirst, MoveLast, MoveNext, MovePrevious, MoveTo, Push, Scroll, UpdateControls, UpdateRecord and Validate.

Low level events

change, char, click, close, dblClick, deselect, drop, fKeyDown, fKeyUp, goBottom, goDown, goDownBig, goTop, goUp, goUpBig, gotFocus, help, keyDown, keyUp, lostFocus, maximize, minimize, move, ptrDown, ptrDrag, ptrMove, ptrUp, resize, restore, select and timer.

Information about event

When processing the "action logic" for an event, it is important to be aware of the circumstances at the time of the event that may influence the decisions to be taken within the "action logic".

The various parameters can be accessed through a number of macros:

NameDescription
%%EvChoice The current choice.
%%EvControl The control for which the event occurred.
%%EvElement The element for which the event occurred.
%%EvKey Which key was pressed for a key event.
%%EvNext The next control in focus order.
%%EvPrior The previous control in focus order.
%%EvPtrButton The mouse button that caused the event to happen.
%%EvPtrPos The position of the mouse.
%%EvPtrState The combination of mouse buttons depressed.
%%EvSequence The sequence number of the event.
%%EvType The type of the event.
%%EvWindow The window for which the event occurred.

Event Sequence

The following list shows which high level events follow which low level events for the individual object types
Object Low level events High level events
Window and all ControlsgotFocusEnter
Window and all ControlslostFocusExit
Combo Box, Date, Document,
Spin Button, Text Box
changeModified, Exit
ButtonselectPush
Radio Buttondeselect, selectPush
Check Boxdeselect, selectCheck
Drop Down List, List Box,
Long List
deselect, selectChoose
ScrollselectScroll
Long ListgoBottom, goDown, goDownBig,
goTop, goUp, goUpBig
Scroll

Where more than one low level event is listed for a single table entry, any of the events lead to the same high level event. If the high level event action logic needs to know its originator it can examine the event information. Where more than one high level event is listed, if action logic for a given event in the list executes code from the macro %%NotOK before quitting then no further events will be triggered for the chain of events in question.

Other chained events

The following table summarises other situations not covered above where the successful completion of action logic on one event (i.e. %%NotOK is not executed) causes another event's logic to be performed. Note that this table does not cover the MSM-SQL Data Control events.

Initial event Chained event
Window CreateInitially-enabled control Create events, in collating sequence of control name. The window and all its defined controls have been created before any Control Create events occur
Window DestroyInitially-enabled control Destroy events, in collating sequence of control name. The window is not killed until after all Control Destroy events complete successfully.