what method is invoked when dock icon is clicked?

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

  1. TurboLag macrumors member

    Joined:
    Feb 24, 2004
    #1
    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

    Joined:
    Feb 16, 2007
    Location:
    Waterloo, Ontario
    #2
    Check the NSApplication class documentation for:
    Code:
    - (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