You could use:
- (void)windowWillClose:(NSNotification*)notification
{
[aboutWindow setDelegate:nil];
[NSApp terminate:self];
}
Replace "aboutWindow", with your window.
You could also use [NSApp stop:self] but terminate ends more
gracefully...
Am 12.03.2008 um 00:51 schrieb Felipe Monteiro de Carvalho:
Thanks for the answers, this indeed works very well. Delegates are
quite easy to work with!
But what if I wanted to have a "main window". i.e. the application
only closes when this window is closed? I did a small search, and I
see I can set a delegate for windowWillClose, but I wonder if this is
the best way to do this ...
thanks a lot =)
--
Felipe Monteiro de Carvalho
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/cocoa-dev%40deelen.de
This email sent to [EMAIL PROTECTED]
Joachim Deelen
AQUARIUS-software
http://www.aquarius-software.de
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]