Terminating app when a document window has a sheet attached
Terminating app when a document window has a sheet attached
- Subject: Terminating app when a document window has a sheet attached
- From: Charles Srstka <email@hidden>
- Date: Fri, 15 Mar 2002 15:59:22 -0600
Re-post: The problem is caused by something other than what I previously
thought.
The real problem seems to be when one of my document windows in a
document-based application has a sheet attached. When this is the case,
the app will not quit. It also will not call any of the delegate methods
such as applicationShouldTerminate:. I was hoping to override this
method and have it ask the user if they wanted to quit while tasks were
going on, and if the user answered in the affirmative, kill all the
threads and quit. It doesn't work - the method never gets called. In
fact, from what I can tell, absolutely nothing at all happens when the
user chooses Quit when a doc window is held up by a sheet.
I previously blamed this on the threading, but it turns out that that
has nothing to do with it - when the thread is running, it communicates
via DO to the main thread and puts up a sheet with a progress bar in it.
When the thread is done, it closes the sheet, and then the app will quit
normally. I found that if I made the thread not close the sheet when it
was done, the program still wouldn't quit, so it's not the threads.
Any ideas?
Thanks,
Charles
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.