• 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
Show application when dock icon clicked
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Show application when dock icon clicked


  • Subject: Show application when dock icon clicked
  • From: Byron Wright <email@hidden>
  • Date: Thu, 17 Jan 2008 14:07:56 -0800

I'm trying to show my application window when a user clicks on their dock icon. This works fine when the application is not active because I can do this in my window/app delegate:

- (void)applicationDidBecomeActive:(NSNotification *)aNotification {
    [mainWindow makeKeyAndOrderFront:self];
}

- (BOOL)windowShouldClose:(id)window {
    [mainWindow orderOut:self];
    return NO;
}

That's fine if the users closes the window then deactivates it but doesn't work if the user closes the window then clicks on the dock icon. I cannot find an obvious delegate from NSApplication or NSWindow that provides me with a notification when the dock icon is clicked. Am I overlooking something?

cheers,
Byron
_______________________________________________

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: Show application when dock icon clicked
      • From: j o a r <email@hidden>
  • Prev by Date: Re: NSLog broken after call of NSTask and setStandardError
  • Next by Date: mountedLocalVolumePaths and fileAttributesAtPath strange behavior
  • Previous by thread: Creating NSStrings in RubyCocoa
  • Next by thread: Re: Show application when dock icon clicked
  • Index(es):
    • Date
    • Thread