• 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: Responding to Dock Click
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Responding to Dock Click


  • Subject: Re: Responding to Dock Click
  • From: "Ian G. Gillespie" <email@hidden>
  • Date: Sat, 15 Oct 2005 00:01:18 -0400

Hi Nick,

Check out NSApplication's - (BOOL)applicationShouldHandleReopen: (NSApplication *)theApplication hasVisibleWindows:(BOOL)flag

If you create a sub-class of NSApplication you can over-ride this and check if your window should be shown. Hope that helps.
~Ian



On Oct 14, 2005, at 10:36 PM, email@hidden wrote:

Hello,

I'm writing a Cocoa single window based app. When the window is
closed, I'd like my app to continue running, which happens by default
in Cocoa. However, when someone clicks my app's icon in the dock
while the window is closed, I would like to automatically reopen my
main window (like most apps do).

I'm sure there is a default cocoa method to do this, but I cannot
find it. Any suggestions would be greatly appreciated!
Nick D'Amato


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Drag image of NSView
  • Next by Date: Re: Drag image of NSView
  • Previous by thread: Re: Responding to Dock Click
  • Next by thread: unknown host cvs.Sourceforge.net
  • Index(es):
    • Date
    • Thread