• 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: AppleEvent handlers don't seem to work.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AppleEvent handlers don't seem to work.


  • Subject: Re: AppleEvent handlers don't seem to work.
  • From: Martin Redington <email@hidden>
  • Date: Wed, 14 Jun 2006 18:28:43 +0100


The awakeFromNib method that I'll installing the handlers from is in my NSDocumentController subclass, and is the application delegate, and its gets called way before applicationWillFinishLaunching:


Even if not calling early enough explains why I don't get the initial open event, I should still be seeing my handler invoked when reopen or open documents is sent.

I guess its possible that I'm not generating those events, but according to the docs clicking the app's dock icon when its in the background should send a reopen, and I would have thought the applescript fragment I sent would get me a open documents event.

I built a test project that just installs the handlers and contains the callback. Still no joy :-(

On 14 Jun 2006, at 17:10, Annard Brouwer wrote:

Make sure you install these event handlers as soon as possible. For instance in your NSApp delegate in - applicationWillFinishLaunching:. Otherwise the standard Apple handler has already handled this event (it is in the docs by the way).

Annard

On 14 Jun 2006, at 17:49, Martin Redington wrote:
====

My understanding is that my app will receive an apple event from LSLaunchURLSpec, and that I can inspect this AppleEvent, to see if my passthrough arg os present or not.

=====

So, I tried installing new kAEOpenApplication, kAEReopenApplication, and kAEOpenDocuments handlers, in my controller's awakeFromNib method, like so:

NSAppleEventManager *appleEventManager = [NSAppleEventManager


_______________________________________________ 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
  • Follow-Ups:
    • Re: AppleEvent handlers don't seem to work.
      • From: Martin Redington <email@hidden>
References: 
 >AppleEvent handlers don't seem to work. (From: Martin Redington <email@hidden>)
 >Re: AppleEvent handlers don't seem to work. (From: Annard Brouwer <email@hidden>)

  • Prev by Date: Re: Calculating Desktop Icon Positions
  • Next by Date: Re: Programmatically restarting Mac OS X
  • Previous by thread: Re: AppleEvent handlers don't seem to work.
  • Next by thread: Re: AppleEvent handlers don't seem to work.
  • Index(es):
    • Date
    • Thread