mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-24 11:37:32 +03:00
GH-232 Install AppleEvent handler in "will-finish".
- It's too late in "did-finish" when the App is not launched.
This commit is contained in:
parent
8a171528ed
commit
7cf3c2e7bc
@ -80,6 +80,12 @@ extension AppDelegate {
|
||||
|
||||
func applicationWillFinishLaunching(_: NSNotification) {
|
||||
self.launching = true
|
||||
|
||||
let appleEventManager = NSAppleEventManager.sharedAppleEventManager()
|
||||
appleEventManager.setEventHandler(self,
|
||||
andSelector: #selector(AppDelegate.handleGetUrlEvent(_:withReplyEvent:)),
|
||||
forEventClass: UInt32(kInternetEventClass),
|
||||
andEventID: UInt32(kAEGetURL))
|
||||
}
|
||||
|
||||
func applicationDidFinishLaunching(_: NSNotification) {
|
||||
@ -92,12 +98,6 @@ extension AppDelegate {
|
||||
#if DEBUG
|
||||
self.debugMenu.hidden = false
|
||||
#endif
|
||||
|
||||
let appleEventManager = NSAppleEventManager.sharedAppleEventManager()
|
||||
appleEventManager.setEventHandler(self,
|
||||
andSelector: #selector(AppDelegate.handleGetUrlEvent(_:withReplyEvent:)),
|
||||
forEventClass: UInt32(kInternetEventClass),
|
||||
andEventID: UInt32(kAEGetURL))
|
||||
}
|
||||
|
||||
func applicationOpenUntitledFile(sender: NSApplication) -> Bool {
|
||||
|
Loading…
Reference in New Issue
Block a user