• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Terminating app when a document window has a sheet attached
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: Dragging to text fields
  • Next by Date: NSCell Question?
  • Previous by thread: Re: How do I give an IB object a custom icon?
  • Next by thread: NSCell Question?
  • Index(es):
    • Date
    • Thread