Re: Several Cocoa questions
Re: Several Cocoa questions
- Subject: Re: Several Cocoa questions
- From: "Clark S. Cox III" <email@hidden>
- Date: Wed, 27 Feb 2002 18:32:41 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wednesday, February 27, 2002, at 04:46 , email@hidden wrote:
3) When the last window of the program is closed, what code is necessary
to tell the entire program to shut down? Also, how would I link in this
information to my interface, if necessary?
Normally, you'd let the user decide that they want to quit the program,
rather than automatically quitting for them when the last window is
closed. However, the NSApplication delegate method
applicationShouldTerminateAfterLastWindowClosed: will let you do what you
want, if you really want to do it. (This delegate method is left over
from the days of Cocoa on Windows, where this was standard behavior, I
believe).
Of course, for some programs, this is the perfect response to closing
the last window (take DiskCopy, KeyCaps or ProcessViewer for instance).
- --
Clark S. Cox, III
email@hidden
http://clarkcox.dyndns.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (Darwin)
Comment: For info see
http://www.gnupg.org
iD8DBQE8fWygd6STocYT1xURAsjyAJ9o9hqppWqKbPpJrHCT8ikTG/MiOACfb+Lp
RvkXU/JZSUcfpMq7FbtjZbs=
=61IO
-----END PGP SIGNATURE-----
_______________________________________________
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.