In the relatively short time of using clojure, I'm a little frustrated
with it's limited information the stack provides.  I'm assuming
there's something I just don't know or am not doing.  Many times when
I do something wrong, I have to read through the stack which sometimes
just says there's an error at line 0, which doesn't help me much.

For something like this, I'm seeing a cast exception, which I assume
has something to do with the proxy.  Reading the docs on proxy, I feel
like I understand it correctly as I've used it to setup mouse
listeners before.  In java the compiler might complain that a given
function isn't implemented.  In clojure, I read that an
UnsupportedOperationException would be thrown should that
unimplemented function be called, which isn't happening here.

(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)

Could someone point me to what the problem is here in this code?  Or
more specifically how to debug this better in the future.

-- 
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