/* ************************* Main Code Block ********************** */
/* * Standard Main Code Block. This dispatches two events: * 'initialize' * 'process-web-request' * The bulk of web processing is in the procedure 'process-web-request' * elsewhere in this WebObject. */ {src/web2/hmapmain.i} |
/* The CLOSE event can be used from inside or outside the procedure to */
/* terminate it. */ ON CLOSE OF THIS-PROCEDURE RUN destroy. /* Now enable the interface and wait for the exit condition. */ /* (NOTE: handle ERROR and END-KEY so cleanup code will always fire. */ MAIN-BLOCK: DO ON ERROR UNDO MAIN-BLOCK, LEAVE MAIN-BLOCK ON END-KEY UNDO MAIN-BLOCK, LEAVE MAIN-BLOCK ON STOP UNDO MAIN-BLOCK, LEAVE MAIN-BLOCK: /* Load the HTM handles etc. */ RUN initialize. /* Process the current web event. */ RUN process-web-request. END. /* Run the local/adm-destroy procedures, if the procedure is ending. */ IF NOT THIS-PROCEDURE:PERSISTENT THEN RUN destroy. |