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

Re: How to quit


  • Subject: Re: How to quit
  • From: Gwynne <email@hidden>
  • Date: Tue, 8 Jun 2004 10:06:57 -0400

On Jun 8, 2004, at 9:30 AM, Mark Thomas wrote:
As part of learning Coca from instead of always using carbon. I have
managed to put something other which seems to work quite well in the time,
but now have a problem as is how to say I want to finish and quit this
application.

Any pointers ???, as I need to call this from a registered "C" callback
mechanism within my application, as I register this callback with my
javascript functions, so when they want to quit, I need to quit out of here,
fairly sharpness I immediate. I guess "exit() would work", but I think
telling the Coca framework I want to quit would be better so I could then,
so something after in my main() proc.

Call [NSApp terminate:self]. This won't execute anything after NSApplicationMain(), however; it ultimately calls exit() itself. However, you can implement applicationWillTerminate: in your application delegate object, and do your cleanup there. More information can be found at:

http://developer.apple.com/documentation/Cocoa/Reference/ ApplicationKit/ObjC_classic/Classes/NSApplication.html#//apple_ref/doc/ uid/20000012/CACCGIJC

-- Gwynne, key to the Code that runs us all
Formerly known as Sailor Quasar.
Email: email@hidden
Web: http://musicimage.plasticchicken.com/
_______________________________________________
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: How to quit
      • From: Finlay Dobbie <email@hidden>
References: 
 >How to quit (From: Mark Thomas <email@hidden>)

  • Prev by Date: Re: How to quit
  • Next by Date: Re: Problem with custom control in NSToolbar
  • Previous by thread: Re: How to quit
  • Next by thread: Re: How to quit
  • Index(es):
    • Date
    • Thread