Re: applicationShouldTerminate problem
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