- (IBAction) terminateMyApp: (id) sender{
//NSLog(@"Quitting"); //debugging line
[NSUserDefaults resetStandardUserDefaults]; //save whatever preferences are currently used
exit(0);
//[NSApp terminate: sender]; //standard message tries to save dirty docs, etc.
}
this method is not invoked when closing the app from xcode or any other way.
- (void)applicationWillTerminate:(NSNotification *)notification
- (void)applicationWillTerminate:(NSNotification *)notification