I\'m writing a very lightweight app for OSX 10.6+ which will respond to a user clicking on a URL, pass that URL to another application via TCP and then exit.
So far
You should be creating your AppleEvent handlers in -applicationWillFinishLaunching: instead.
-applicationWillFinishLaunching:
The idea is to have your handlers ready to go before your application begins processing AppleEvents.