Re: Responding to Dock Click
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