Exit_Application - cObject

Starts the process of closing an application

Type: Procedure

Parameters: None

Procedure Exit_Application 

Call: Send Exit_Application


The Exit_Application message is used to close the program.

What happens during the closing process is:

1. Verify_Exit_Application is sent to the main panel. By default, it sends Verify_Exit_Application to all views. Each view checks to see of there are changes and prompts Verify_Exit. If any of these return a non-zero value, the closing is halted. Verify_Exit_Application in any of these objects (main panel or views) can be augmented. You should always forward send this message.

2. If the main panel and all views allow the exit, Notify_Exit_Application is sent to the main panel. It saves the environment and sends Notify_Exit_Application to all views, which saves the environment for each view. If you augment these, you probably want to forward send them, as well.

Web Applications

Be careful about sending Exit_Application in a Web Application. This is most likely an error. Most web applications use Process Pooling and should thus never be fully closed. They function by processes attaching and detaching from a running web application. See Web Application Flow for more information.