From 9431ed58510cb174d99f0d8fa0e5b4db7814c7d6 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 8 Aug 2015 22:04:03 -0400 Subject: [PATCH] Added a more comprehensive test of the basics. Woo! Now to convert the test that's in main.swift_... --- redo/osxaltest/main.swift | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/redo/osxaltest/main.swift b/redo/osxaltest/main.swift index f3f352bd..c7b6f323 100644 --- a/redo/osxaltest/main.swift +++ b/redo/osxaltest/main.swift @@ -16,8 +16,17 @@ func appLaunched() { var box = Box(vertical: firstvert, padded: spaced) mainwin.SetControl(box) - box.Add(Entry(), false) - box.Add(Button("Button"), false) + var hbox = {(entrys: Bool, buttons: Bool) -> Box in + var hbox = Box(vertical: !firstvert, padded: spaced) + hbox.Add(Entry(), entrys) + hbox.Add(Button("Button"), buttons) + return hbox + } + + box.Add(hbox(true, true), false) + box.Add(hbox(true, false), false) + box.Add(hbox(false, true), false) + box.Add(hbox(false, false), false) mainwin.Show()