Release 10.1A: OpenEdge Development:
ADM Reference

> ## exitObject

> Procedure that passes an exit request to its container.

> Location: smart.p

> Parameters: None

> Notes:

> - By convention, the standard routine always passes an exit request to its CONTAINER–SOURCE. The container that actually initiates the exit should define a local version and not call the standard one. That local exitObject is built into the SmartWindow template. This allows any SmartObject to initiate a destroy operation on its container. When it runs exitObject (for example, when a user pressing a Done button), this event is passed up through the Container link hierarchy until an object is found that is at the appropriate level to initiate a destroy of all its contents. As noted, this is normally the SmartWindow, where exitObject does `APPLY ‘CLOSE’ TO THIS–PROCEDURE`, that in turn runs destroyObject.

> - exitObject could be customized when you want behavior other than, or in addition to, invoking exitObject in the ContainerSource. As noted, the default localization in SmartWindows is to APPLY CLOSE to initiate a destroyObject sequence. A local version of this, in an object other than a SmartWindow, could do additional custom cleanup. Note that because exitObject is defined in the SmartWindow template, a localization of it in a SmartWindow must exclude the standard code to prevent a duplicate procedure definition.

> Examples:

>     /*  This example is taken from the standard code for the “Done” button in
>         the AppBuilder palette. If the object containing the button is a
>         SmartWindow, then the code executes the standard convention for
>         destroying a SmartWindow, APPLY "CLOSE". If not, the code runs
>         exitObject to pass the event up to its Container, otherwise the effect
>         would be to destroy only the SmartPanel or other SmartObject
>         containing the button, which is probably not what is intended. */
>     &IF "{&PROCEDURE-TYPE}" EQ "SmartWindow" &THEN
>          RUN exitObject.
>     &ELSE
>          APPLY "CLOSE":U TO THIS-PROCEDURE.
>     &ENDIF

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