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

programatically quit a program


  • Subject: programatically quit a program
  • From: "Wayne Shao" <email@hidden>
  • Date: Thu, 28 Aug 2008 13:38:57 -0700

Hi

What is the correct way to quit a cocoa app?  I could use C exit() but that
would loose the chance to invoke the right callbacks for clean up.
What is the call that would be equivalent to user explicitly selecting the
Quit from the menu.

I only found this

[[NSApplication sharedApplication] teminate:??];

But the  terminate function takes an id for sender. What shall I use?


Thanks,
--
Wayne Shao
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: programatically quit a program
      • From: Ben Stiglitz <email@hidden>
    • Re: programatically quit a program
      • From: Ken Thomases <email@hidden>
    • Re: programatically quit a program
      • From: Andrew Farmer <email@hidden>
    • Re: programatically quit a program
      • From: Robert Claeson <email@hidden>
  • Prev by Date: Undocumented Leopard support for overlapping sibling views
  • Next by Date: Re: Convert unicode string into ascii
  • Previous by thread: Re: Undocumented Leopard support for overlapping sibling views
  • Next by thread: Re: programatically quit a program
  • Index(es):
    • Date
    • Thread