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

Re: how to terminate the application?


  • Subject: Re: how to terminate the application?
  • From: "stephen joseph butler" <email@hidden>
  • Date: Sat, 10 Feb 2007 06:22:18 -0600

2007/2/10, Silicon <email@hidden>:
In my controller, I treat the File's owner as an outlet of my
controller, which named theApp.
I draw a connection from my controller's theApp outlet to the file's
owner;
Then if the user clicks a button, I send the message to [theApp
terminate], however it doesnt work-the application is still running.
What's wrong? Can someone tell me how should I accomplish this task?

This is all unnecessary because AppKit provides a global variable called NSApp.

Also, it's "terminate:", not "terminate". Call [NSApp terminate:nil]
from anywhere inside your main thread.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >how to terminate the application? (From: Silicon <email@hidden>)

  • Prev by Date: how to terminate the application?
  • Next by Date: Re: different initialization method?
  • Previous by thread: how to terminate the application?
  • Next by thread: Re: how to terminate the application?
  • Index(es):
    • Date
    • Thread