Re: applicationShouldTerminate problem

2009-12-04 Thread Jens Alfke
On Dec 3, 2009, at 12:25 AM, proger proger wrote: int ret = NSRunAlertPanel(@"Save the work?", @"Do you want save the work?", A modal alert is the wrong UI here. It should be a sheet on the window. I used Interface Builder to delegate NSApplication with my delegate controller. But don't se

Re: applicationShouldTerminate problem

2009-12-04 Thread proger proger
Thanks for point. Now I'm experimenting with document based cocoa application. I'm added NSTextView to my application interface, but after i load file i didn't see anything. My code: - (void)windowControllerDidLoadNib:(NSWindowController *) aController { [super windowControllerDidLoadNib:aCont

Re: applicationShouldTerminate problem

2009-12-03 Thread Andrew Farmer
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 (textCh

Fwd: applicationShouldTerminate problem

2009-12-03 Thread proger proger
Hello, 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 th