Re: Closing an app with the red dot.
Jim Do you realise that this is a mailing list for software developers? Nonetheless, assuming you don't mean programatically, simply click on the application in the Dock. Joanna -- Joanna Carter Carter Consulting ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Closing an app with the red dot.
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. You have a nice day Joanna. Jim On May 17, 2011, at 6:35 AM, Joanna Carter wrote: Jim Do you realise that this is a mailing list for software developers? Nonetheless, assuming you don't mean programatically, simply click on the application in the Dock. Joanna -- Joanna Carter Carter Consulting JIM ROGERS jimrogers_w4...@me.com http://web.me.com/jimrogers_w4atk ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Closing an app with the red dot.
when you 'close' the window - by default the application is not being terminated - you can get your window back programmatically by calling [myWindow makeKeyAndOrderFront]. This is what some apps call, when you click their icon on dock to get the closed window back. You can legally terminate application by closing its window as well if you return YES in the method -(BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication of your application's delegate. 2011/5/17 JAMES ROGERS jimrogers_w4...@me.com: 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. You have a nice day Joanna. Jim On May 17, 2011, at 6:35 AM, Joanna Carter wrote: Jim Do you realise that this is a mailing list for software developers? Nonetheless, assuming you don't mean programatically, simply click on the application in the Dock. Joanna -- Joanna Carter Carter Consulting JIM ROGERS jimrogers_w4...@me.com http://web.me.com/jimrogers_w4atk ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/eveningnick%40gmail.com This email sent to eveningn...@gmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Closing an app with the red dot.
JAMES ROGERS jimrogers_w4...@me.com 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 (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Closing an app with the red dot.
On May 17, 2011, at 8:08 AM, Pascal J. Bourguignon wrote: JAMES ROGERS jimrogers_w4...@me.com writes: I am a cocoa developer, albeit a new one. So I have every right to post this question on this site. I think Joanna can be forgiven for an honest misunderstanding. Thank you very much, but clicking on the application in the dock does not work in my case. Yes it does. It brings your app back to the foreground, which is the literal question you asked. 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. I agree, that is not the right answer. [...] 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. In a document-based application the default is to create a new untitled window. You can tell it not to by implementing applicationShouldHandleReopen:hasVisibleWindows: in the app delegate. But it sounds like your app is not document-based. 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. Yup. Or if there is a specific singleton window, and it lives in MainMenu.nib, you can simply connect the menu item to it in IB with an action of makeKeyAndOrderFront:. In this case make sure to uncheck the Release When Closed checkbox, so the window instance doesn't get prematurely deallocated. Also you can implement the applicationShouldHandleReopen:hasVisibleWindows: method mentioned above to automatically reopen the window, if you prefer. --Andy ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Closing an app with the red dot.
On May 17, 2011, at 8:44 AM, Andy Lee wrote: Also you can implement the applicationShouldHandleReopen:hasVisibleWindows: method mentioned above to automatically reopen the window, if you prefer. Though I'm not sure as a user I'd like that. Maybe that is what people meant when they said that is the way Mac works. --Andy ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Closing an app with the red dot.
I am a cocoa developer, albeit a new one. So I have every right to post this question on this site. I think Joanna can be forgiven for an honest misunderstanding. My apologies; I also moderate other technical newsgroups and it is sometimes easy to jump to the wrong conclusion, especially when the OP doesn't mention anything to do with programming :-) Joanna -- Joanna Carter Carter Consulting ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Closing an app with the red dot.
Joanna, No problem. I should have phrased it better. After many exchanges the simplest and best solution for this particular application came from Andy, just disable the button. I am a retired Senior Systems Analyst and certainly can be guilty of tossing a few stones at glass houses. Picking up a new language at 77 is a challenge. Very best regards, Jim On May 17, 2011, at 9:07 AM, Joanna Carter wrote: I am a cocoa developer, albeit a new one. So I have every right to post this question on this site. I think Joanna can be forgiven for an honest misunderstanding. My apologies; I also moderate other technical newsgroups and it is sometimes easy to jump to the wrong conclusion, especially when the OP doesn't mention anything to do with programming :-) Joanna -- Joanna Carter Carter Consulting ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/jimrogers_w4atk%40me.com This email sent to jimrogers_w4...@me.com JIM ROGERS jimrogers_w4...@me.com http://web.me.com/jimrogers_w4atk ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Closing an app with the red dot.
On 17.05.2011, at 14:54, Andy Lee wrote: On May 17, 2011, at 8:44 AM, Andy Lee wrote: Also you can implement the applicationShouldHandleReopen:hasVisibleWindows: method mentioned above to automatically reopen the window, if you prefer. Though I'm not sure as a user I'd like that. Maybe that is what people meant when they said that is the way Mac works. Doesn't matter what you like as a user, you're a programmer :-p Seriously, many applications on the Mac work that way. Close all windows in Mail.app and click on the dock: Presto! New mail window. Cheers, -- Uli Kusterer The Witnesses of TeachText are everywhere... http://www.masters-of-the-void.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Closing an app with the red dot.
This is a classic instance of having to look at the nature or the application to decide if it is an appropriate action. I use both models depending upon the application. The general approach I take is to look at the app in question determine if there is any legitimate reason it should stay open when the main window is closed. EG. Suppose the application is a simple dialog based app, take for example an app I use once or twice a week to decrypt Cisco Group Names from .ini config files. Once I've displayed the decrypted password on screen, and closed the window, should the app remain loaded? I would argue no. it is small enough that reloading it is not an issue, so closing the last window closes the app. The inverse of this is a document based app. I cannot come up with many reasons a document app should ever exit when the last document window is closed. This is counter to how Windows devs would function and as many new MAc devs bring some of those notions, it is something to be aware of. In other words, think long and hard before implementing a behavior that is non-standard to the platform, or you quickly find yourself in the 'Why am I using an app tthe feels like a Windows App on the Mac?' conundrum -- Andy 'Dru' Satori On Tuesday, May 17, 2011 at 11:40 AM, Uli Kusterer wrote: On 17.05.2011, at 14:54, Andy Lee wrote: On May 17, 2011, at 8:44 AM, Andy Lee wrote: Also you can implement the applicationShouldHandleReopen:hasVisibleWindows: method mentioned above to automatically reopen the window, if you prefer. Though I'm not sure as a user I'd like that. Maybe that is what people meant when they said that is the way Mac works. Doesn't matter what you like as a user, you're a programmer :-p Seriously, many applications on the Mac work that way. Close all windows in Mail.app and click on the dock: Presto! New mail window. Cheers, -- Uli Kusterer The Witnesses of TeachText are everywhere... http://www.masters-of-the-void.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/dru%40druware.com This email sent to d...@druware.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Closing an app with the red dot.
On Tue, May 17, 2011 at 8:56 AM, Andy 'Dru' Satori d...@druware.com wrote: This is a classic instance of having to look at the nature or the application to decide if it is an appropriate action. I use both models depending upon the application. The general approach I take is to look at the app in question determine if there is any legitimate reason it should stay open when the main window is closed. The approach you should take is outlined in the HIG: http://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/AppleHIGuidelines/XHIGWindows/XHIGWindows.html#//apple_ref/doc/uid/2961-TPXREF56 In most cases, applications that are not document-based should quit when the main window is closed. For Example, System Preferences quits if the user closes the window. If an application continues to perform some function when the main window is closed, however, it may be appropriate to leave it running when the main window is closed. For example, iTunes continues to play when the user closes the main window. I'd say this is roughly equivalent to your approach. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com