Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples
Left Hand Pointer


M[UMPS] by Example

Right Hand Pointer

Introduced in the 1995 ANSI M[UMPS] Windowing Application Programmer's Interface standard.

This structured system variable provides information about the events that may occur in the current M[UMPS] system.

Write !,"An event was just recognized."
Set T=^$Event("TYPE"),C=^$Event("CLASS")
Set S=^$Event("SEQUENCE")
Write !,"Event number ",S,", event type was ",T
Write " and event-class was ",C,"."
Set W=$Get(^$Event("WINDOW"))
If W'="" Write !,"Event occurred in window ",W,"."
Set E=$Get(^$Event("ELEMENT"))
If E'="" Write !,"Event was associated with ",E,"."
Set K=^$Event("KEY")
If K'="" Write !,"Depressed keys: ",K,"."
Set P=^$Event("PPOS")
Write !,"Cursor located at (",P,")."
Set K=^$Event("PSTATE")
If K'="" Write !,"Depressed mouse buttons: K,"."
. Write !,"The choice was ",^$Event("CHOICE"),"."
. Quit
. Set N=^$Event("NEXTFOCUS")
. Write !,"Focus transferred to ",N,"."
. Quit
. Set P=^$Event("PRIORFOCUS")
. Write !,"Focus transferred from ",P,"."
. Quit
If $Data(^$Event("OK")) Quit
; Perform event-specific clean-up activities

Approved for addition in a future M[UMPS] Language standard.

The ability to process events in an asynchronous fashion is introduced. The commands ABlock, ASTArt, ASTOp and AUnblock allow for starting and stopping recognition of certain events. The structured system variable ^$Job is used to register the entry point this is intended to be started when a certain event occurs. Nodes in ^$Event are used to specify other specific behavior of the various events.

^$Event("EVENTDEF","TIMER",timerid,"INTERVAL") identifies the duration of the waiting period for a specific timer.

^$Event("EVENTDEF","TIMER",timerid,"ACTIVE") indicates whether a specific timer is currently active (boolean value).

^$Event("EVENTDEF","TIMER",timerid,"AUTO") is the value that would be re-set automatically into ^$Event("EVENTDEF","TIMER",timerid,"INTERVAL") when its value decrements to a value that is not positive (note that 0 is not a positive number in M[UMPS]).

Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

Copyright © Standard Documents; 1977-2017 MUMPS Development Committee;
Copyright © Examples: 1995-2017 Ed de Moel;
Copyright © Annotations: 2003-2017 Jacquard Systems Research.

The information in this page is NOT authoritative and subject to be modified at any moment.
Please consult the appropriate (draft) language standard for an authoritative definition.

Some specifications are "approved for inclusion in a future standard". Note that the MUMPS Development Committee cannot guarantee that such future standards will indeed be published.

This page most recently updated on 28-Nov-2011, 20:33:03 .

For comments, contact Ed de Moel (demoel@jacquardsystems.com)