One nice thing about Clojure is that double-parenthesized ((anything)) is usually wrong.

Stu

Hi,

On Mon, Mar 29, 2010 at 11:23:29AM -0700, strattonbrazil wrote:

(import '(javax.swing JTable) '(javax.swing.table TableModel))
(def table (new JTable((proxy [TableModel] []
                               (getColumnCount [] 10)
                               (getRowCount [] 10)
                               (getValueAt [row column] (* row
column))))))
java.lang.ClassCastException: clojure.proxy.java.lang.Object
$TableModel (NO_SOURCE_FILE:2)

You have an extra pair of parens around the proxy call which will treat
the proxy as function which won't work.

Try this:

(import 'javax.swing.JTable 'javax.swing.table.TableModel)
(def table (JTable. (proxy [TableModel] []
                     (getColumnCount [] 10)
                     (getRowCount [] 10)
                     (getValueAt [row column] (* row column)))))

Sincerely
Meikel

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

To unsubscribe from this group, send email to clojure +unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

To unsubscribe from this group, send email to clojure+unsubscribegooglegroups.com or 
reply to this email with the words "REMOVE ME" as the subject.

Reply via email to