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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to