So many questions...

151 views
Skip to first unread message

skf.p...@gmail.com

unread,
Jul 16, 2018, 6:39:42 AM7/16/18
to seesaw-clj
Hi there,

Three questions.

(def b (button :text "XSD" :size [30 :by 30] :margin 2))
(def c (button :text "XML" :size [30 :by 30] :margin 2))
(def v (button :text "Validate" :size [160 :by 30]:margin 2))
(def sd (text "XSD"))

(def splt (top-bottom-split
(horizontal-panel :sd b])
(top-bottom-split (horizontal-panel :items [(text "XML") c])
 v)))

(listen v :action (fn [e] (alert (apply :message (errors (is-valid-xml? (slurp xml-path)))))))

(def dl (dialog :content "Replace this with something more informative."))

  1. When button b is clicked the listener calls the xerces library and that then locks the user interface for a few important seconds.  Is there an easy way to handle this gracefully (liker running the library call in another thread and disabling v until it returns)?
  2. How do I link the text panes to the buttons, to show the file paths of chosen files and then when Enter is pressed trigger an event like the button press?
  3. How do I configure a dialog to show an icon and something like a multi-line label centered?
I have found the bind-api and attempted working through that to get point 2 ('sd').  I am still be missing something.

I nearly have my application finished but these three (probably simple) things have me stumped.  Thanks in advance.
Reply all
Reply to author
Forward
0 new messages