But that doesn't address the fundamental lack of useful information in the error messages, which is something I've noticed as well. The compiler could stand to be a bit friendlier in this regard..
On Mon, Mar 29, 2010 at 3:55 PM, Stuart Halloway <stuart.hallo...@gmail.com> wrote: > 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. > -- Mark J. Reed <markjr...@gmail.com> -- 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.