• 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 customize Comand +Q handler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to customize Comand +Q handler


  • Subject: Re: How to customize Comand +Q handler
  • From: René Puls <email@hidden>
  • Date: Thu, 20 Jan 2005 11:06:30 +0100

Hello Jacky,

Am 20.01.2005 um 10:55 schrieb jacky.zhu:

hi all,
 
Anybody could tell me how to customize Command+Q handler.I would like to avoid my program be quited when user type 'command +Q'.Maybe it is easy, but I don't know yet.

If you want to control whether your application can be quit at all, you should probably implement applicationShouldTerminate: in your NSApplication delegate. If you return NO from this method, the application will keep running.


On the other hand, if you just want to prevent the keyboard shortcut Cmd-Q from quitting your app, simply change or remove it from the Quit menu item in your MainMenu.nib.

Kind regards,
René Puls

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How to customize Comand +Q handler
      • From: Guy English <email@hidden>
References: 
 >How to customize Comand +Q handler (From: "jacky.zhu" <email@hidden>)

  • Prev by Date: How to customize Comand +Q handler
  • Next by Date: Novice question: How to catch button click event in Doc based app?
  • Previous by thread: How to customize Comand +Q handler
  • Next by thread: Re: How to customize Comand +Q handler
  • Index(es):
    • Date
    • Thread