Progress
ADM 2 Guide


Writing a Local Event Procedure

Follow these steps in the AppBuilder to write a local event procedure:

  1. Invoke the Code Section Editor, go to the Procedures code section, and choose the New button. The New Procedure dialog box appears:
  2. Activate the Override radio button. The AppBuilder populates the Name combo box list with the ADM event procedures available in the super procedures for the SmartObjects:
  3. Select the ADM event procedure for which you want to write a local version, then choose OK. The AppBuilder returns you to the Code Section Editor and creates a procedure with the same name. If this procedure already exists, the AppBuilder displays the existing code section.
  4. The default code for a local event procedure always executes the standard version of the procedure, located in one of the SmartObject’s super procedures. For example, for addLink, the following line appears in the local version:

    RUN SUPER ( INPUT phSource, INPUT pcLink, INPUT phTarget). 
    

    This allows you to put code before or after the standard event procedure call or not run the code at all (by commenting it out).

    NOTE: Do not suppress the standard event procedure by removing the RUN SUPER statement unless you are sure that you understand what it does and that you replace it correctly.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095