• 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: applicationShouldTerminate problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: applicationShouldTerminate problem


  • Subject: Re: applicationShouldTerminate problem
  • From: Andrew Farmer <email@hidden>
  • Date: Thu, 3 Dec 2009 23:05:10 -0800

On 3 Dec 2009, at 00:25, proger proger wrote:
> I'm making little cocoa application. After the application will be closed i
> need to show alert. So i created applicationShouldTerminate delegate:
>
> - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication*)app {
>
> if (textChanged == 1)
>
> {
>
> int ret = NSRunAlertPanel(@"Save the work?", @"Do you want save the work?",
> @"Yes", @"Cancel", @"No" ) ;

You are reimplementing NSDocumentController, awkwardly. Read this before you continue:

http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Documents/Documents.html

Don't reinvent the wheel!_______________________________________________

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: applicationShouldTerminate problem
      • From: proger proger <email@hidden>
References: 
 >Fwd: applicationShouldTerminate problem (From: proger proger <email@hidden>)

  • Prev by Date: beginSheetForDirectory:file:types:modalForWindow:modalDelegate:didEndSelector: on 10.6
  • Next by Date: How to get an italic font
  • Previous by thread: Fwd: applicationShouldTerminate problem
  • Next by thread: Re: applicationShouldTerminate problem
  • Index(es):
    • Date
    • Thread