Re: NSApplication terminate: behavior
Re: NSApplication terminate: behavior
- Subject: Re: NSApplication terminate: behavior
- From: Andreas Färber <email@hidden>
- Date: Wed, 25 Jan 2006 11:19:25 +0100
Am 21.01.2006 um 00:01 schrieb Camillo Lugaresi:
Use NSNotificationCenter to send the
NSApplicationWillTerminateNotification.
You should probably also go throught the window list and close each
window, eg:
NSArray *windows = [NSApp windows];
unsigned count = [windows count];
while (count--) {
[[windows objectAtIndex:count] close];
}
Finally, I guess you can try calling [NSApp release];
Closing the windows was a great tip! The trick here is to hide the
application first, otherwise I get the spinning color wheel and related
problems I mentioned.
I'm also sending a "NSApplicationWillTerminate" notification but I
didn't notice any difference.
Haven't got it fully working, but I'm a step further. :-)
Thanks,
Andreas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden