39 lines
1.0 KiB
Swift

//
// AppDelegate.swift
// Graphic Analysis 2
//
// Created by Kilian Hofmann on 15.06.17.
// Copyright © 2017 Kilian Hofmann. All rights reserved.
//
import Cocoa
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
var lock: pthread_mutex_t = pthread_mutex_t()
func applicationDidFinishLaunching(_ aNotification: Notification) {
// Insert code here to initialize your application
pthread_mutex_init(&((NSApp.delegate as! AppDelegate).lock), nil)
/* TESTBED
do {
let data: NSData = try NSData(contentsOfFile: "/Users/kili2/Desktop/2017.docsisplist2/06/20/Downstream 666000000.hex")
print(FileOperations.loadDownstream(log: data))
} catch _ {
exit(-1)
}
**/
}
func applicationWillTerminate(_ aNotification: Notification) {
// Insert code here to tear down your application
}
func applicationShouldOpenUntitledFile(_ sender: NSApplication) -> Bool {
return false
}
}