what method is invoked when dock icon is clicked?

Discussion in 'Mac Programming' started by TurboLag, Apr 30, 2008.

  1. TurboLag macrumors member

    Feb 24, 2004
    After the user clicks the red close button on my application, I would like the window to re-appear when the icon in the dock is clicked. I have created the method to re-show the window in the menu bar, but I would also like an icon-click to invoke the same method.

    What method is invoked when the icon is clicked?
  2. lucasgladding macrumors 6502

    Feb 16, 2007
    Waterloo, Ontario
    Check the NSApplication class documentation for:
    - (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag
    For anything like this, the first places to look are usually NSApplication or NSDocument IMHO.

Share This Page