Re: Quit on close Window?
Re: Quit on close Window?
- Subject: Re: Quit on close Window?
- From: David Remahl <email@hidden>
- Date: Sun, 4 May 2003 18:10:11 +0200
On Sunday, May 4, 2003, at 05:57 PM, Michael Hanna wrote:
Like most things in Cocoa, the solution to this is probably obvious
and simple, but I'm not clear on how to do it. How do you set a
single-window, "MainMenu.nib" program to quit on closure of the > window?
regards,
Michael
In the window delegate, implement:
- (void)windowDidClose:(NSNotification *)notif
{
if( [notif object] == mainWindow )
[NSApp terminate:self];
}
/ Regards, David Remahl
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.