Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you are generally unfamiliar with promoted events then we highly encourage you to read Andrew McAuley’s The X Events article (see the References section below). This article has remained the standard primer on the subject and will provide a more general explanation than what will be discussed here.

...

  1. The name of the function is arbitrary. We use a name that is similar to the actual name of the promoted event for organizational purposes. You can use whatever name you wish as long as you put the correct name in the “RUN COPY_ROW” statement.
  2. APP_INSERTS contains the equates we use to assign our promoted events a numerical value for easy routing purposes. For instance, “Equ Create$ to 1”. See the References section for the full list.
  3. When the program is compiled, the “RUN COPY_ROW” statement should be copied to the Exec line of the System Editor and executed. This moves the appropriate object code for this function from the SYSOBJ table into the SYSREPOSEVENTEXES table. At this point the promoted event exists in your system.
  4. In our promoted events we call a “commuter module” function called Promoted_Events (an obvious name for obvious reasons.) Sample code for this function will be shown later. Remember, events are essentially functions (returning a 1 or 0) and therefore our Promoted_Events function returns a 1 or 0 to provide appropriate event chaining.

...