• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: applicationShouldTerminateAfterLastWindowClosed bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: applicationShouldTerminateAfterLastWindowClosed bug?


  • Subject: Re: applicationShouldTerminateAfterLastWindowClosed bug?
  • From: Hasan Diwan <email@hidden>
  • Date: Wed, 14 Jul 2004 12:04:42 -0700

Murat:
Does your app show the main window or is it closed for the about
panel? If closed, then it's expected behaviour, if not, file a bug.

On Tue, 13 Jul 2004 22:57:18 -0700, m <email@hidden> wrote:
> I think I've found a surprising bug related to NSApplication's
> applicationShouldTerminateAfterLastWindowClosed delegate method. I
> would appreciate if anyone else could verify it or explain why it's not
> a bug. This is in Mac OS X 10.3.4
>
> The bug is that if your app has a delegate, and the delegate implements
> applicationShouldTerminateAfterLastWindowClosed to return YES, bringing
> up the about box causes the app to quit.
>
> To reproduce:
>
> 1) make a Cocoa App project (non-document based)
> 2) add an application delegate like this one (don't forget to hook it
> up in Interface Builder)
>
> /* AppDelegate.h */
>
> #import <Cocoa/Cocoa.h>
>
> @interface AppDelegate : NSObject
> {
> }
> @end
>
> --------------------------
> /* AppDelegate.m */
>
> #import "AppDelegate.h"
>
> @implementation AppDelegate
>
> - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication
> *)theApplication
> {
> return YES;
> }
> @end
>
> 3) build and launch the app
> 4) open the about box
>
> Result: Poof! The app quits.
>
> _murat
> _______________________________________________
> 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.
>
>


--
Cheers,
Hasan Diwan <email@hidden>
_______________________________________________
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.


  • Follow-Ups:
    • Re: applicationShouldTerminateAfterLastWindowClosed bug?
      • From: m <email@hidden>
References: 
 >applicationShouldTerminateAfterLastWindowClosed bug? (From: m <email@hidden>)

  • Prev by Date: Hiding NSComboBoxCells In An NSOutlineView
  • Next by Date: Re: Child and Parent windows have dysfunctional relationship?
  • Previous by thread: applicationShouldTerminateAfterLastWindowClosed bug?
  • Next by thread: Re: applicationShouldTerminateAfterLastWindowClosed bug?
  • Index(es):
    • Date
    • Thread