Re: Click dock icon, make main window reappear
Re: Click dock icon, make main window reappear
- Subject: Re: Click dock icon, make main window reappear
- From: Uli Kusterer <email@hidden>
- Date: Wed, 23 May 2007 21:42:30 +0200
On 23.05.2007, at 17:00, Brian Weitzner wrote:
I thought it would be a problem if my users closed the windows
associated with my app and couldn't get them back without quitting
and restarting the app. I want to make it so that when the dock
icon is clicked, the main window will appear if all the windows are
closed (like Mail). I tried google, but that was not helpful as
there are a lot of articles having to do with dock icons and
windows that have nothing to do with this problem. I'm sorry if
this is a stupid question, but how does one do this? Thanks!
In addition to the delegate method Shawn mentioned, there's also the
option of telling NSApplication to close when the last window is
closed. Depending on what your application does, and how useful it is
without any windows, that may be the better choice.
Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden