• 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
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: applicationShouldTerminateAfterLastWindowClosed


  • Subject: Re: applicationShouldTerminateAfterLastWindowClosed
  • From: Steve Palmer <email@hidden>
  • Date: Wed, 11 Feb 2004 04:23:26 +0000

I set this in -(void)awakeFromNib in my AppController class. I also
connected File's Owner to AppController in IB which would presumably
make doing setDelegate redundant.

The delegate code is:

-(BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication
*)theApplication
{
return YES;
}

I verified that the delegate is never called. I put a breakpoint on
this and close the one window that the application creates, and the
delegate never gets called. Instead, I tried:

-(void)windowWillClose:(NSNotification *)notification
{
[NSApp terminate:nil];
}

and that worked fine.

- Steve


On Feb 10, 2004, at 12:14 AM, Andreas Mayer wrote:

> Am 09.02.2004 um 03:44 schrieb Steve Palmer:
>
>> I set [NSApp setDelegate:self] in my app controller
>
> *Where* do you set this? Is that code executed at all?
>
>
> bye. Andreas.
> _______________________________________________
> 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.
_______________________________________________
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
      • From: Andreas Mayer <email@hidden>
    • Re: applicationShouldTerminateAfterLastWindowClosed
      • From: "Laurent Daudelin" <email@hidden>
References: 
 >applicationShouldTerminateAfterLastWindowClosed (From: Peter Wollschlaeger <email@hidden>)
 >Re: applicationShouldTerminateAfterLastWindowClosed (From: "M. Uli Kusterer" <email@hidden>)
 >Re: applicationShouldTerminateAfterLastWindowClosed (From: Steve Palmer <email@hidden>)
 >Re: applicationShouldTerminateAfterLastWindowClosed (From: Andreas Mayer <email@hidden>)

  • Prev by Date: Simple example of threading
  • Next by Date: RE: Cocoa wizard & gurus, Help!!
  • Previous by thread: Re: applicationShouldTerminateAfterLastWindowClosed
  • Next by thread: Re: applicationShouldTerminateAfterLastWindowClosed
  • Index(es):
    • Date
    • Thread