## The `onClose' callback

Event number: 10
Generated for: All objects, but usually applies to Window, Form, Document or Dialog, or an APL (child task) object.

The `onClose` callback indicates a request to close an object (usually a window). It can be generated as a result of the user clicking the close box of a window, or by the system. If you have defined an `onClose` callback, the window is not closed automatically; your `onClose` callback should do this if appropriate, by invoking the `Close` method with an argument of 1 to cause an unconditional close. You might also wish to delete the window as well.

The `onClose` callback is treated specially in one way. Normally when an APL callback is defined for an event, it is run after the system default handler for that event. The default handler for a Close event is to close and delete the object, but doing this would make it impossible for your `onClose` handler to suppress the close action. For this reason, setting the `onClose` callback property automatically disables the default system handler for the close event on that object.

For an APL (child task) object, the `onClose` callback is triggered when the child task is about to terminate for any reason.

Topic: APLX Help : System Classes : Callbacks : onClose

[ Previous | Next | Contents | Index ]