• 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: Unable to Terminate Application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unable to Terminate Application


  • Subject: Re: Unable to Terminate Application
  • From: Markus Hitter <email@hidden>
  • Date: Wed, 31 Mar 2004 00:24:30 +0200

Am 30.03.2004 um 23:51 schrieb Frederick C. Lee:

I thought I could just 'terminate' the application.

You can. But not from within a method which might be called when the app is actually terminated. Doing it in one of your action methods is fine.



Hence, I would like to know the proper procedure to terminate a Cocoa application (without documents).

It's [NSApp terminate:self]. Note the additional argument.

Obj-C allows methods with the same base name but differently named/a different count of arguments. You'll never get an "1 arguments expected but 0 given" error in Obj-C.


HTH, Markus


P.S.: When terminating, don't count on -dealloc messages being sent. If you have to do some clean up on -terminate, look up -applicationWillTerminate: ...


- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Unable to Terminate Application
      • From: "Frederick C. Lee" <email@hidden>
References: 
 >Unable to Terminate Application (From: "Frederick C. Lee" <email@hidden>)
 >Re: Unable to Terminate Application (From: Markus Hitter <email@hidden>)
 >Re: Unable to Terminate Application (From: "Frederick C. Lee" <email@hidden>)

  • Prev by Date: Re: Unable to Terminate Application
  • Next by Date: Re: Unable to Terminate Application
  • Previous by thread: Re: Unable to Terminate Application
  • Next by thread: Re: Unable to Terminate Application
  • Index(es):
    • Date
    • Thread