Re: Closing an app with the red dot.
Re: Closing an app with the red dot.
- Subject: Re: Closing an app with the red dot.
- From: "Pascal J. Bourguignon" <email@hidden>
- Date: Tue, 17 May 2011 14:08:02 +0200
- Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg==
- Organization: InformatiMago.
JAMES ROGERS <email@hidden> writes:
> I am a cocoa developer, albeit a new one. So I have every right to
> post this question on this site. Thank you very much, but clicking on
> the application in the dock does not work in my case. That would be a
> rather obvious answer and one of the many things I tried. Based on
> some of the web guru sites, I am not the first to pose this question
> and a not willing to accept the answer I see most, "that is the way
> Mac works". That is why I came to this site, as a last resort.
The red button on windows doesn't impact the application (unless it's so
programmed), but only the window.
It sends the windowShouldClose: message to the window or window
delegate, and if it doesn't return NO, it sends the message close: to
the window.
(The application could override -[NSWindow close:] and do something
else, or could return NO from windowShouldClose: and do something else
(eg. hidding the window) instead.)
Now, it's up to the application to leave a mean to resume working when
all the windows are closed. The way it's done depends on the
application, but the only thing that will remain after all the windows
are closed or hidden, for the user to command the application, is the
menus.
So you should have an item in a menu that will order an action, such as
the opening of a new window. It is often with the menu File, item
Open... that the user will be able to open a new document window to
resume working with the application.
But some applications are not document centered. You may propose a
menu Game / item "New Game", or a menu Activity / item "New Processing"
or whatever.
--
__Pascal Bourguignon__ http://www.informatimago.com/
A bad day in () is better than a good day in {}.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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