The info(“runningatomic”) function returns true if the current procedure is running as an “atomic” procedure.
Description
Panorama procedures are usually triggered by relatively “hi-level” events like clicking on a button or choosing from a menu. However there is a special type of procedure that is triggered by more low level events like simply bringing a window to the front. These “event handler” procedures (also called simply “atomic procedures”) let you control how Panorama responds to these low level events.
Internally, atomic procedures work slightly differently than regular procedures. When an atomic procedure is triggered, Panorama stops everything and runs that procedure immediately. If a regular procedure causes the atomic procedure to trigger, the regular procedure will pause and wait for the atomic procedure to finish before continuing.
Atomic procedures are intended for changing the way Panorama responds to various low level events. An atomic procedure cannot contain any statements that would cause more low level events. In practical terms this means that an atomic procedure cannot change the arrangement of windows on the screen in any way - it cannot bring another window to the top, open a new window, close a window, or open or close any files. You cannot use the debugger with atomic procedures, because the debugger itself generates low level events. An error dialog will appear if your atomic procedure attempts to perform a statement that would cause another low level event. Atomic procedures should not pause for user input unless you really want to annoy your users. (However, it can sometimes be convenient to use a message statement to help debug an atomic procedure.)
Atomic procedures should be as short as possible. Extra delays in processing low level events will be very noticeable. The atomic procedure should only deal with the event in question and should not contain any other logic for your application. If possible an atomic procedure should be written with one or two simple statements or formulas.
Sometimes the same procedure may be triggered in different ways – sometimes as a normal procedure, sometimes as an atomic procedure. In that case the procedure can use the info(“runningatomic”) function to determine what mode the procedure is currently running in. This function returns true if the procedure is running as atomic code, false if the procedure is running as a normal procedure.
See Also
History
Version | Status | Notes |
10.2 | No Change | Carried over from Panorama 10.1, but under a new name (was info("runninghandler") |