Re: Clicking dock icon opens window
Re: Clicking dock icon opens window
- Subject: Re: Clicking dock icon opens window
- From: Charles Bennett <email@hidden>
- Date: Wed, 21 Nov 2001 07:59:16 -0500
Look for applicationShouldHandleReopen:hasVisibleWindows:
When the app icon is clicked on the apps delegate will receive this notification,
Do whatever you need to do to open a new window and return YES or NO depending..
Read the doc's in NSApplication for the full story.
chuck
Marc Laffitte wrote:
>
>
On mercredi, novembre 21, 2001, at 07:44 , Mario Diana wrote:
>
>
> Assuming there are no open windows in your application, clicking the
>
> application's icon in the dock is supposed to open a window. How does
>
> one implement this? The app I built from the "Simple Text Editor"
>
> project from Mike Beam at O'Reilly did it, but I can't figure out how.
>
>
>
> The application I'm working on is not document based. It has only one
>
> window and some alert panels. I figured out how to implement the "New"
>
> command from the File menu, but this is vexing me.
>
>
>
> For the life of me, I cannot figure this out by myself. I knocked
>
> around in Interface Builder for a good, long time. I searched the
>
> documentation, the ADC, and the list's archives, and for all I know I
>
> read right over it. But, I tried -- I swear!
>
>
>
>
>
>
Hi!
>
Clicking on an application's icon in the dock either launches it or
>
makes it the front application if it is allready launched. This is not
>
directly an order to open a window. You may or may not open a window if
>
it is appropriate for you in such cases.
>
You can look at NSApplication.h and use a notification like
>
applicationDidBecomeActive: in order to know when to open a window.
>
>
Marc
>
_______________________________________________
>
cocoa-dev mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev