Next: Setting your application's icon Up: The shared application object Previous: The run loop of

Terminating your application

Whenever you want to terminate your application, you can do:
[NSApp terminate: nil];
This is usually done when the user selects the Quit entry in the main menu. When you terminate your application, the gui library quits the run loop and exits the program.

Btw, the argument of terminate: is of no importance, so we can pass any argument (nil in this case); the only reason why this method takes an object as argument is that it can then be set as the action of a gui control (discussed below).



Nicola Pero 2000-07-21