I asked a question about quitting an App when windows close, and the answer was to use delegates :
There is a optional method for the application's delegate which will do this automatically. All you have to due is add this to the implementation. You don't need to create an outlet or anything.
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication return YES; }
It definitely works, but you may have put the code in the wrong place. Make sure it's in your application's delegate.
I'm not sure how can I put the applicationShouldTerminateAfterLastWindowClosed
in the application's delegate?