[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: application not quitting
From: |
Fred Kiefer |
Subject: |
Re: application not quitting |
Date: |
Wed, 15 Oct 2008 19:20:46 +0200 |
User-agent: |
Thunderbird 2.0.0.17 (X11/20080922) |
Gregory Weston wrote:
> In article <mailman.1052.1224018351.25473.discuss-gnustep@gnu.org>,
> Marko Riedel <markoriedelde@yahoo.de> wrote:
>
>> the environment is KDE 3.5 (sorry, I had no choice in the matter), but the
>> same problem occurs with WindowMaker. The application is not document-based
>> and does have an application delegate and applicationShouldTerminate: is
>> invoked. As I did not subclass NSApplication I don't know whether
>> replyToApplicationShouldTerminate: gets called (this is not a delegate
>> method
>> according to developer.apple.com).
>
> Correct; it's not a delegate method. It's a message that's sent to the
> NSApplication instance at some point after the delegate's
> applicationShouldTerminate: returns NSTerminateLater. It's a way to
> conditionalize termination on uncached things like user input. You
> really shouldn't need to send this message if applicationShouldTerminate
> returns any other defined value.
>
All of this is true, but this method
(replyToApplicationShouldTerminate:) gets also called internally from
terminate:. What I was interesting in would be to find out how far this
methods gets progressed. This could be checked by adding a few NSLog()
statements and recompiling gui. I know this is asking much, but I am not
able to reproduce this behaviour here and so I need to get more
information from a machine where it actually fails.
Adding something like
NSLog(@"replyToApplicationShouldTerminate: called with %d isrunning %d",
shouldTerminate, _app_is_running);
as the first line and then ever other line something like
NSLog(@"replyToApplicationShouldTerminate: now at line %d", __LINE__);
This could provide the needed information and help solve the mysterious
issue.
Fred