From 8ae6c9d02a2eefe6ad921e46f90a9320e6040b03 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 8 Aug 2015 19:47:53 -0400 Subject: [PATCH] Switched to processing command-line arguments for setting the variables in main.swift. --- redo/osxaltest/main.swift | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/redo/osxaltest/main.swift b/redo/osxaltest/main.swift index aa2a6e88..f3f352bd 100644 --- a/redo/osxaltest/main.swift +++ b/redo/osxaltest/main.swift @@ -35,7 +35,15 @@ class appDelegate : NSObject, NSApplicationDelegate { } func main() { - spaced = Process.arguments.count > 1 + for arg in dropFirst(Process.arguments) { + if arg == "spaced" { + spaced = true + } else if arg == "horizontal" { + firstvert = false + } else { + fatalError("unrecognized option \(arg)") + } + } var app = NSApplication.sharedApplication() app.setActivationPolicy(NSApplicationActivationPolicy.Regular)