Progress
ADM 2 Guide
Writing Local Event Procedures and Functions
An event procedure is a procedure that executes when a particular event occurs. This is sometimes accomplished through the PUBLISH/SUBSCRIBE functionality, as follows:
Sometimes, however, this happens simply when a SmartObject RUNs an internal procedure or invokes a user-defined function. In either case, the procedure or function being executed is normally implemented in a separate super procedure. (See the "Super Procedures" section in SmartObject Interactions.")
The super procedure functionality allows you to write a local version of an ADM internal procedure or function in a SmartObject master procedure file that augments or overrides default ADM events. When the ADM runs an internal procedure or function, Progress 4GL looks at the SmartObject and its super procedures, starting with a local version if there is one, and runs the first one it finds. If this super procedure performs a RUN SUPER or SUPER( ), the 4GL looks further up the super procedure chain to find the next version to run. A local version of an ADM procedure can execute code before, after, or instead of the more standard behavior of the internal procedures and functions in ADM super procedures.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |