From a6f27a1fefce3a0a825eca3dbd502584411755f5 Mon Sep 17 00:00:00 2001 From: Toxblh Date: Thu, 12 Apr 2018 18:55:54 +0100 Subject: [PATCH 1/2] open preset for editing then you click by Preferences in menu. --- MTMR/AppDelegate.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MTMR/AppDelegate.swift b/MTMR/AppDelegate.swift index d15e6ca..4ebe7c7 100644 --- a/MTMR/AppDelegate.swift +++ b/MTMR/AppDelegate.swift @@ -28,6 +28,12 @@ class AppDelegate: NSObject, NSApplicationDelegate { @objc func testFn(_ sender: Any?) { let quoteText = "You click on menu" + let task = Process() + let appSupportDirectory = NSSearchPathForDirectoriesInDomains(.applicationSupportDirectory, .userDomainMask, true).first!.appending("/MTMR") + let presetPath = appSupportDirectory.appending("/items.json") + task.launchPath = "/usr/bin/open" + task.arguments = [presetPath] + task.launch() print(quoteText) } From 4b480dddc38217a6665abfa66291ba01c67ed11e Mon Sep 17 00:00:00 2001 From: Toxblh Date: Thu, 12 Apr 2018 18:57:02 +0100 Subject: [PATCH 2/2] del the quote --- MTMR/AppDelegate.swift | 2 -- 1 file changed, 2 deletions(-) diff --git a/MTMR/AppDelegate.swift b/MTMR/AppDelegate.swift index 4ebe7c7..e5e7926 100644 --- a/MTMR/AppDelegate.swift +++ b/MTMR/AppDelegate.swift @@ -27,14 +27,12 @@ class AppDelegate: NSObject, NSApplicationDelegate { } @objc func testFn(_ sender: Any?) { - let quoteText = "You click on menu" let task = Process() let appSupportDirectory = NSSearchPathForDirectoriesInDomains(.applicationSupportDirectory, .userDomainMask, true).first!.appending("/MTMR") let presetPath = appSupportDirectory.appending("/items.json") task.launchPath = "/usr/bin/open" task.arguments = [presetPath] task.launch() - print(quoteText) } func createMenu() {