(fn [] 5) ; row-count-proc
(fn [r c] (if (= c 0) "OK" true)))] ;
get-value-at-proc
(doto frame
(.setContentPane tbl)
.pack
.show)
On Feb 11, 4:33 pm, Meikel Bra
How would I code the following in clojure?
JTable table = new JTable(new MyTableModel()) {
...
//Implement table header tool tips.
protected JTableHeader createDefaultTableHeader() {
return new JTableHeader(columnModel) {
public String getToolTipText(MouseEvent e)
Here's some code that works as I expected:
dyn.clj
(println *value*)
test.clj
(def *value* 'ok)
(defn test-eval []
(load-file "dyn.clj"))
(test-eval)
=> 'ok
But when run in an event handler it fails:
test.clj
(import '(javax.swing JButton JFrame)
'(java.aw
I'm attempting what should be a simple transformation using a macro
called dlg in the following code:
(defn fld [parent lay id text field]
'...)
;; dlg macro. For this input:
;;
;; (dlg "test"
;; (field fld-1 "Field number one" (JTextField.))
;; (field fld-2 "Field number two" (JTextField.))
I'm attempting what should be a simple macro transformation (dlg
below):
(defn fld [parent lay id text field]
'...)
;; dlg macro. For this input:
;;
;; (dlg "test"
;; (field fld-1 "Field number one" (JTextField.))
;; (field fld-2 "Field number two" (JTextField.)))
;;
;; we want this output:
I'm getting stuck on what should be a simple macro (dlg below). It
produces 2 different symbols (for 'parent#) when I was expecting both
to refer to the same symbol. Here's the code:
(defn fld [parent lay id text field]
'...)
;; dlg macro. For this input:
;;
;; (dlg "test"
;; (field fld-1
I'm attempting what should be a simple transformation using a macro
called dlg in the following code:
(defn fld [parent lay id text field]
'...)
;; dlg macro. For this input:
;;
;; (dlg "test"
;; (field fld-1 "Field number one" (JTextField.))
;; (field fld-2 "Field number two" (JTextField.))