Re: Dock Application Click
Re: Dock Application Click
- Subject: Re: Dock Application Click
- From: Peter Maurer <email@hidden>
- Date: Wed, 23 Mar 2005 09:14:54 +0100
I'm not *entirely* sure how well this would translate into Cocoa, but
when the dock icon is clicked, the application is sent an apple event
of class "aevt" and id "rapp".
Indeed. The easiest way to get these events is to implement
NSApplication's delegate method
-applicationShouldHandleReopen:hasVisibleWindows: in a controller
class.
From the documentation: Sent by theApplication to the delegate prior to
default behavior to reopen (rapp) AppleEvents. These events are sent
whenever the Finder reactivates an already running application because
someone double-clicked it again or used the dock to activate it.
So obviously, this is not entirely specific for dock clicks, but I
guess it's as close as you can get. Cheers,
Peter.
The issue becomes that even when using CMD-Tab when gaining focus the
application triggers applicationDidBecomeActive (as expected).
What I want to do is find what delegate (if any) to use to hijack
the dock click so the action is triggered ONLY when the application
dock icon is clicked on (when the application is running, of course).
Any pointers would be great.
_______________________________________________
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