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

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
References: 
 >Dock Application Click (From: "A.Sleep" <email@hidden>)
 >Re: Dock Application Click (From: Dave DeLong <email@hidden>)

  • Prev by Date: create a server listening on a specific port
  • Next by Date: Re: NSPopupButtons and NSArrayControllers question and behavior
  • Previous by thread: Re: Dock Application Click
  • Next by thread: Re: Dock Application Click
  • Index(es):
    • Date
    • Thread