3

Currently I'm using an application with a form designed in WindowBuilder. The form contains a button which I want to use in Clojure/seesaw. So my question is: how am I able to use the button defined in Java in Clojure?

Kind regards, Mittchel

Mittchel
  • 1,896
  • 3
  • 19
  • 37

1 Answers1

3

If you're following the WindowBuilder example, you can use seesaw.core/select to find the button and then use seesaw.core/listen as usual. For example, if you have a button named "foo" in your form and, after you've called the identify function:

(listen (select my-window-builder-form [:#foo]) 
  :action (fn [e] ... you're code ...))
Dave Ray
  • 39,616
  • 7
  • 83
  • 82
  • Thanks for your response! but I'm getting an error: Exception in thread "main" java.lang.IllegalArgumentException: No implementation of method: :id-of* of protocol: #'seesaw.selector/Selectable found for class: nil In the following code: http://pastebin.com/inv3KKwN Do you know what I'm doing wrong? – Mittchel Jun 10 '12 at 17:35