Re: Add method implementations to proxy

2010-11-17 Thread Mark Rathwell
> Hi, i added your example (quoting the source) to > http://clojuredocs.org/clojure_core/clojure.core/update-proxy Great, thank you. On Wed, Nov 17, 2010 at 8:31 AM, atreyu wrote: > Hi, i added your example (quoting the source) to >

Re: Add method implementations to proxy

2010-11-17 Thread atreyu
Hi, i added your example (quoting the source) to http://clojuredocs.org/clojure_core/clojure.core/update-proxy On Nov 17, 2:05 pm, Mark Rathwell wrote: > An example of update-proxy in case it may help anyone in the future: > > user> (import java.util.Date) > java.util.Date > > user> (def d (prox

Re: Add method implementations to proxy

2010-11-17 Thread Mark Rathwell
An example of update-proxy in case it may help anyone in the future: user> (import java.util.Date) java.util.Date user> (def d (proxy [Date] [] (toString [] "hello"))) #'user/d user> d # user> (.toString d) "hello" user> (.toGMTString d) "17 Nov 2010 12:57:28 GMT" user> (update-proxy d {"toGM

Re: Add method implementations to proxy

2010-11-17 Thread Mark Rathwell
Beautiful. Thank you! On Wed, Nov 17, 2010 at 2:07 AM, Liam wrote: > More information from Rich himself about "update-proxy" when he first > introduced it. Could not find examples for you except from the Joy of > Clojure book on page 273, but it is very trivial... just like the doc > string so

Re: Add method implementations to proxy

2010-11-16 Thread Liam
More information from Rich himself about "update-proxy" when he first introduced it. Could not find examples for you except from the Joy of Clojure book on page 273, but it is very trivial... just like the doc string sounds. http://groups.google.com/group/clojure/browse_thread/thread/ed1652132dfa6

Re: Add method implementations to proxy

2010-11-16 Thread Liam
Would this help? http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/update-proxy -- 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 mode