2015-07-16 23:53:53 +00:00
|
|
|
//
|
|
|
|
// AppDelegate.swift
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 16/07/2015.
|
2018-05-13 19:19:52 +00:00
|
|
|
// Copyright 2015 Thomas Harte. All rights reserved.
|
2015-07-16 23:53:53 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
import Cocoa
|
|
|
|
|
|
|
|
@NSApplicationMain
|
|
|
|
class AppDelegate: NSObject, NSApplicationDelegate {
|
|
|
|
|
2016-09-16 02:12:12 +00:00
|
|
|
func applicationDidFinishLaunching(_ aNotification: Notification) {
|
2019-08-05 01:34:30 +00:00
|
|
|
// Insert code here to initialize your application.
|
2015-07-16 23:53:53 +00:00
|
|
|
}
|
|
|
|
|
2016-09-16 02:12:12 +00:00
|
|
|
func applicationWillTerminate(_ aNotification: Notification) {
|
2019-08-05 01:34:30 +00:00
|
|
|
// Insert code here to tear down your application.
|
2015-07-16 23:53:53 +00:00
|
|
|
}
|
|
|
|
|
2016-09-16 02:12:12 +00:00
|
|
|
func applicationShouldOpenUntitledFile(_ sender: NSApplication) -> Bool {
|
2019-08-05 01:34:30 +00:00
|
|
|
// Decline to show the 'New...' selector by default, preferring to offer
|
|
|
|
// an 'Open...' dialogue.
|
|
|
|
//
|
|
|
|
// Obiter: I dislike it when other applications do this for me, but it
|
|
|
|
// seems to be the new norm, and I've had user feedback that showing
|
|
|
|
// nothing is confusing. So here it is.
|
|
|
|
NSDocumentController.shared.openDocument(self)
|
2016-01-07 02:09:49 +00:00
|
|
|
return false
|
|
|
|
}
|
2015-07-16 23:53:53 +00:00
|
|
|
}
|