• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: User Experience, Bring App Window back when Clicking Dock Icon
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: User Experience, Bring App Window back when Clicking Dock Icon


  • Subject: Re: User Experience, Bring App Window back when Clicking Dock Icon
  • From: Ken Thomases <email@hidden>
  • Date: Thu, 1 Apr 2010 08:01:43 -0500

On Apr 1, 2010, at 3:55 AM, Gustavo Pizano wrote:

> I was reading a little about the user Experience, but I hadn't been able to achieve the goal, when I close the window, it closes the it but the app doesn't terminate but I can't bring it back again, I have set in IB to don't release when closed. I tried doing something with the Window Menu, but once I close the window it deactivate all the items, so I can't associate a Menu Item to the App's makeFrontAndKey method,  I guess Im really missing something,
>
> The other option I see is that most of the apps once I click the dock icon again it will bring the window back on screen,  how to achieve this? some window delegate method?

The application delegate: -applicationOpenUntitledFile:

What's happening is that clicking the Dock icon is "relaunching" the app.  The same happens if the user double-clicks the app's icon in the Finder when it's already running.  That is handled by:

-applicationShouldHandleReopen:hasVisibleWindows:
-applicationShouldOpenUntitledFile:
-applicationOpenUntitledFile:

If the first two are unimplemented or return YES, then it invokes the third (if it's implemented).  In there, you can make your main window key and order it front.

Cheers,
Ken

_______________________________________________

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

  • Follow-Ups:
    • Re: User Experience, Bring App Window back when Clicking Dock Icon
      • From: Gustavo Pizano <email@hidden>
References: 
 >User Experience, Bring App Window back when Clicking Dock Icon (From: Gustavo Pizano <email@hidden>)

  • Prev by Date: Centering scrollRowToVisible on NSTableView
  • Next by Date: Re: User Experience, Bring App Window back when Clicking Dock Icon
  • Previous by thread: User Experience, Bring App Window back when Clicking Dock Icon
  • Next by thread: Re: User Experience, Bring App Window back when Clicking Dock Icon
  • Index(es):
    • Date
    • Thread