Dumb App Quitting Questoin
Dumb App Quitting Questoin
- Subject: Dumb App Quitting Questoin
- From: Tom Gray <email@hidden>
- Date: Tue, 10 Dec 2002 11:19:29 -0500
As always, thanks in advance!
When my application quits my non-NSDocument window (a subclass of
NSWindowController ) is not prompting to "save" changes prior to
closing.
If I register to receive NSApplicationWillTerminateNotification I can
prompt the user to "save" the document. However, I am not sure how I
can "cancel" the pending "quit".
If I make my non-NSDocument window the application's delegate I can
implement applicationShouldTerminate and do what I want (allow the user
to save the document or cancel the quit).
It strikes me as being "wrong" to have my non-NSDocument window as the
Application's delegate.
Obviously, I was sleeping in class when this was covered.
So, what is the correct way to have my non-NSDocument window (a
subclass of NSWindowController ) be notified that the application is
quitting and allow the user to cancel the quit.
Tom Gray
-------------
email@hidden
or
email@hidden
_______________________________________________
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.