Re: How-to construct for example (.value record) with a macro

2012-07-16 Thread john
Thanks very much for the help ...even when it comes from Cologne (-: -- 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

Re: How-to construct for example (.value record) with a macro

2012-07-16 Thread Moritz Ulrich
Simply use the alternative dot-form: (. (java.util.Date.) getDate) (. record value) On Mon, Jul 16, 2012 at 9:42 PM, john wrote: > Hello, > I have for example: > > (defrecord record [^long value]) > > (def aRecord (record. 123)) > > ; Now I want to construct code like (.value aRecord) > ; with a

How-to construct for example (.value record) with a macro

2012-07-16 Thread john
Hello, I have for example: (defrecord record [^long value]) (def aRecord (record. 123)) ; Now I want to construct code like (.value aRecord) ; with a macro I tried (defmacro inline-first-method[] (let [methods (record/getBasis)] (list '. (first methods) aRecord ))) ;but (macroexpand-1 '