Re: User Experience, Bring App Window back when Clicking Dock Icon
site_archiver@lists.apple.com Delivered-To: cocoa-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=HvqXrRrTYg2n/43CuhqGo/tV4w/CqRLg8+/f+rZzdo0=; b=qDJ0ZhdsJ2emxxP+5SHapNJJndpRQAOuKZtT2u/d/F19xAs67swN+2oFzMINAZ1VR4 SyZ2CzQIICf5Bx6SVpaKq/wx2/NnLY693aVOHl1fPpxruP8C7uk7fQgrSSLLYXK2+nOM 7T9GkKMg+DuNd1TGWJZLxADmgw3mtNLctfrhg= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=wLM+ogNMDau59jtZn7llrXeAsrk6aPFdW1iEGFD6C9veCVklB+wovXogzG6sVKs8UM FYDxbCVy88nTeIShCTBwrkuaJxYBtjk/Ogl9cfrBC0FxYRSVVLa3c561Cu6viaXg29yQ M0NvbCexe1h87EXKJwZS8bXJOGpDtWTVGhDj8= Hen Hi. Oh thanks I was thinking about the same method I but I had my delegate to be the same main window controller, and it wasn't being called, I guess because the window wasn't active, I changed the window delegate to be the App delegate and implemented that method and it worked!! :D, thanks. Gustavo On Apr 1, 2010, at 3:01 PM, Ken Thomases wrote:
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 (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/site_archiver%40lists.apple... This email sent to site_archiver@lists.apple.com
participants (1)
-
Gustavo Pizano