RE: close application from title bar control - close - more than one window
"pradip patel" <[email protected]> Thu, 14 Sep 2006 17:40:51 +0530
| Newsgroups | gmane.comp.lib.gnustep.general,gmane.comp.lib.gnustep.user,gmane.comp.lib.gnustep.applications |
|---|---|
| Message-ID | <[email protected]> |
Hi Previous discussion was fine..that I got and implemented. Now Suppose , I have five window .. On closing ,any one window ,which notification I will get..? I means that I want to close my application ..on closing any window () U have any way to do this.. ? pradip _____ From: Mark Horner [mailto:[email protected]] Sent: Thursday, September 14, 2006 1:54 PM To: pradip patel Cc: [email protected]; [email protected]; [email protected]; [email protected] Subject: Re: close application from title bar control - close - more than one window Not sure what you are on about. Did you disable the close button yourself? Your users may not like that as they might want to get rid of clutter themselves. Can you think of any mac applications where the closed button is disabled? Is the main window an application, and the other window just a panel such as an inspector or a tool palette, in that case you need to make it an instance of NSPanel, so it won't be counted as a window by applicationShouldTerminateAfterLastWindowClosed. -- Regards Mark Horner, Chartered Architect 01580 714506 07976 928586 Orchard Lodge Dorothy Avenue Cranbrook, Kent TN17 3AY On 14 Sep 2006, at 08:40, pradip patel wrote: Hi Marco,, That's done.. Application is closed when I have only one window But as I noticed the problem is that.. I have more than one window.. One is main which I close from close button. And other - close button is disabled.. I want to closed application when I closed main window..---(more than one window is there..) Invoked when the user closes the last window the application has open. - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication { return YES; } If this method returns NO. _______________________________________________ Discuss-gnustep mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnustep