  (-> main-window pack! show!)
  (if @watcher (stop!))
  (if (.exists (File. (text database-location))) 
-   (start! (text database-location) )
+   (start! (text database-location) :tournament tournament-handler :standings standings-handler 
+                 :pairings pairings-handler :results results-handler :seatings seatings-handler )
    (-> (dialog :content "Database not found at default location, please set database location.") pack! show!)))

          (-> tournament-selector pack! show! ))
    (-> (dialog :content "No database opened") pack! show!)))

(def tournament-button (button :text "Select"
                         :listen [:action select-tournament]))

(def api-key (text ""))
 
(def about-window
  (frame

  (:use seesaw.core)
  (:use seesaw.chooser)
  (:use mtg-pairings.watcher)
  (:use mtg-pairings.uploader)
  (:require [cheshire.core :refer :all])
  (:import (java.io File FileNotFoundException)))

(native!)

(def tournament-label (text :text "" :editable? false))

(def tournament-listbox (listbox :model "none" :selection-mode :multi-interval))

(def tournament-selector
  (frame
    :on-close :dispose
