title: How to get the dialog functions work
body: <p>I want to open a dialog, and work with the data after the the dialog returns ok. The problem is that :success-fn is not called after the dialog is submitted. That has something to do with the listener from the button. If the connectDialog is called without listener, the function of :success-fn is called.</p>
  
  <p>Code:</p>
  
  <pre><code>(def dbConnectionForm
    (grid-panel :columns 2
                :items ["Database Driver" (combobox :id :dbdriver :model ["postgresql" "mysql"])
                        "Database"        (text :id :dbname :text "postgres")
                        "Port"            (text :id :dbport :text "32768")
                        "Username"        (text :id :username :text "postgres")
                        "Password"        (text :id :password :text "postgres")]))
  
  (defn connectionDialog []
    (print (-&gt; (dialog
      :content dbConnectionForm
      :option-type :ok-cancel
      :type :plain
      :success-fn (fn [e] (print (value dbConnectionForm)))
      )pack! show!))
    )
  
  (def connectButton (button :text "Connect"
                             :listen [:action (fn [e] (connectionDialog))]))
  </code></pre>